Date: Wed, 14 Nov 2018 23:15:51 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r340448 - in head/sys/cam: ata scsi Message-ID: <201811142315.wAENFp4g017475@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Wed Nov 14 23:15:50 2018 New Revision: 340448 URL: https://svnweb.freebsd.org/changeset/base/340448 Log: Remove trailing white space in advance of other changes. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Nov 14 22:05:20 2018 (r340447) +++ head/sys/cam/ata/ata_da.c Wed Nov 14 23:15:50 2018 (r340448) @@ -987,7 +987,7 @@ adaclose(struct disk *dp) cam_periph_sleep(periph, &softc->refcount, PRIBIO, "adaclose", 1); cam_periph_unlock(periph); cam_periph_release(periph); - return (0); + return (0); } static void @@ -1011,7 +1011,7 @@ adastrategy(struct bio *bp) { struct cam_periph *periph; struct ada_softc *softc; - + periph = (struct cam_periph *)bp->bio_disk->d_drv1; softc = (struct ada_softc *)periph->softc; @@ -1035,7 +1035,7 @@ adastrategy(struct bio *bp) */ if (bp->bio_cmd == BIO_ZONE) bp->bio_flags |= BIO_ORDERED; - + /* * Place it in the queue of disk activities for this disk */ @@ -1068,7 +1068,6 @@ adadump(void *arg, void *virtual, vm_offset_t physical secsize = softc->params.secsize; lba = offset / secsize; count = length / secsize; - if ((periph->flags & CAM_PERIPH_INVALID) != 0) return (ENXIO); @@ -1258,7 +1257,7 @@ adaasync(void *callback_arg, u_int32_t code, { struct ccb_getdev *cgd; cam_status status; - + cgd = (struct ccb_getdev *)arg; if (cgd == NULL) break; @@ -2161,7 +2160,7 @@ ada_zone_cmd(struct cam_periph *periph, union ccb *ccb error = ENOMEM; goto bailout; } - + ata_zac_mgmt_in(&ccb->ataio, /*retries*/ ada_retry_count, /*cbcfnp*/ adadone, @@ -3002,7 +3001,7 @@ adadone(struct cam_periph *periph, union ccb *done_ccb */ if ((softc->valid_logdir_len >= ((ATA_IDENTIFY_DATA_LOG + 1) * sizeof(uint16_t))) - && (le16dec(softc->ata_logdir.header) == + && (le16dec(softc->ata_logdir.header) == ATA_GP_LOG_DIR_VERSION) && (le16dec(&softc->ata_logdir.num_pages[ (ATA_IDENTIFY_DATA_LOG * @@ -3022,7 +3021,7 @@ adadone(struct cam_periph *periph, union ccb *done_ccb * then ATA logs are effectively not * supported even if the bit is set in the * identify data. - */ + */ softc->flags &= ~(ADA_FLAG_CAN_LOG | ADA_FLAG_CAN_IDLOG); if ((done_ccb->ccb_h.status & @@ -3132,7 +3131,7 @@ adadone(struct cam_periph *periph, union ccb *done_ccb softc->state = ADA_STATE_SUP_CAP; xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - } else + } else adaprobedone(periph, done_ccb); return; } @@ -3196,11 +3195,10 @@ adadone(struct cam_periph *periph, union ccb *done_ccb * to an earlier spec, it won't have * the field. So, assume all * commands are supported. - */ + */ softc->zone_flags |= ADA_ZONE_FLAG_SUP_MASK; } - } } else { error = adaerror(done_ccb, CAM_RETRY_SELTO, @@ -3237,7 +3235,7 @@ adadone(struct cam_periph *periph, union ccb *done_ccb softc->state = ADA_STATE_ZONE; xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); - } else + } else adaprobedone(periph, done_ccb); return; } @@ -3321,7 +3319,6 @@ adadone(struct cam_periph *periph, union ccb *done_ccb /*getcount_only*/0); } } - } free(ataio->data_ptr, M_ATADA); @@ -3388,7 +3385,7 @@ adagetparams(struct cam_periph *periph, struct ccb_get dp->secs_per_track = cgd->ident_data.sectors; dp->cylinders = cgd->ident_data.cylinders; dp->sectors = cgd->ident_data.cylinders * - (u_int32_t)(dp->heads * dp->secs_per_track); + (u_int32_t)(dp->heads * dp->secs_per_track); } lbasize = (u_int32_t)cgd->ident_data.lba_size_1 | ((u_int32_t)cgd->ident_data.lba_size_2 << 16); @@ -3602,7 +3599,7 @@ adaresume(void *arg) /*openings*/0, /*timeout*/0, /*getcount_only*/0); - + cam_periph_unlock(periph); } } Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Nov 14 22:05:20 2018 (r340447) +++ head/sys/cam/scsi/scsi_da.c Wed Nov 14 23:15:50 2018 (r340448) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); * Note that there are probe ordering dependencies here. The order isn't * controlled by this enumeration, but by explicit state transitions in * dastart() and dadone(). Here are some of the dependencies: - * + * * 1. RC should come first, before RC16, unless there is evidence that RC16 * is supported. * 2. BDC needs to come before any of the ATA probes, or the ZONE probe. @@ -163,7 +163,7 @@ typedef enum { DA_CCB_PROBE_ATA_ZONE = 0x11, DA_CCB_PROBE_WP = 0x12, DA_CCB_TYPE_MASK = 0x1F, - DA_CCB_RETRY_UA = 0x20 + DA_CCB_RETRY_UA = 0x20 } da_ccb_state; /* @@ -312,7 +312,7 @@ struct da_softc { LIST_HEAD(, ccb_hdr) pending_ccbs; int refcount; /* Active xpt_action() calls */ da_state state; - da_flags flags; + da_flags flags; da_quirks quirks; int minimum_cmd_size; int error_inject; @@ -700,7 +700,7 @@ static struct da_quirk_entry da_quirk_table[] = { /* * PNY USB Flash keys - * PR: usb/75578, usb/72344, usb/65436 + * PR: usb/75578, usb/72344, usb/65436 */ {T_DIRECT, SIP_MEDIA_REMOVABLE, "*" , "USB DISK*", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE @@ -1358,9 +1358,9 @@ static struct da_quirk_entry da_quirk_table[] = }, { /* - * Hama Innostor USB-Stick + * Hama Innostor USB-Stick */ - { T_DIRECT, SIP_MEDIA_REMOVABLE, "Innostor", "Innostor*", "*" }, + { T_DIRECT, SIP_MEDIA_REMOVABLE, "Innostor", "Innostor*", "*" }, /*quirks*/DA_Q_NO_RC16 }, { @@ -1776,7 +1776,7 @@ dastrategy(struct bio *bp) { struct cam_periph *periph; struct da_softc *softc; - + periph = (struct cam_periph *)bp->bio_disk->d_drv1; softc = (struct da_softc *)periph->softc; @@ -1829,7 +1829,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, periph = dp->d_drv1; softc = (struct da_softc *)periph->softc; secsize = softc->params.secsize; - + if ((softc->flags & DA_FLAG_PACK_INVALID) != 0) return (ENXIO); @@ -1856,7 +1856,7 @@ dadump(void *arg, void *virtual, vm_offset_t physical, printf("Aborting dump due to I/O error.\n"); return (error); } - + /* * Sync the disk cache contents to the physical media. */ @@ -1913,7 +1913,7 @@ dainit(void) } else if (da_send_ordered) { /* Register our shutdown event handler */ - if ((EVENTHANDLER_REGISTER(shutdown_post_sync, dashutdown, + if ((EVENTHANDLER_REGISTER(shutdown_post_sync, dashutdown, NULL, SHUTDOWN_PRI_DEFAULT)) == NULL) printf("dainit: shutdown event registration failed!\n"); } @@ -2009,7 +2009,7 @@ daasync(void *callback_arg, u_int32_t code, { struct ccb_getdev *cgd; cam_status status; - + cgd = (struct ccb_getdev *)arg; if (cgd == NULL) break; @@ -2237,7 +2237,7 @@ dasysctlinit(void *context, int pending) SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "unmapped_io", - CTLFLAG_RD, + CTLFLAG_RD, &softc->unmappedio, 0, "Unmapped I/O leaf"); @@ -2246,7 +2246,7 @@ dasysctlinit(void *context, int pending) SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "rotating", - CTLFLAG_RD, + CTLFLAG_RD, &softc->rotating, 0, "Rotating media"); @@ -2646,7 +2646,7 @@ daregister(struct cam_periph *periph, void *arg) free(softc, M_DEVBUF); return(CAM_REQ_CMP_ERR); } - + LIST_INIT(&softc->pending_ccbs); softc->state = DA_STATE_PROBE_WP; bioq_init(&softc->delete_run_queue); @@ -2745,7 +2745,7 @@ daregister(struct cam_periph *periph, void *arg) softc->minimum_cmd_size = 10; else softc->minimum_cmd_size = 6; - + /* Predict whether device may support READ CAPACITY(16). */ if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3 && (softc->quirks & DA_Q_NO_RC16) == 0) { @@ -2823,7 +2823,7 @@ daregister(struct cam_periph *periph, void *arg) AC_INQ_CHANGED, daasync, periph, periph->path); /* - * Emit an attribute changed notification just in case + * Emit an attribute changed notification just in case * physical path information arrived before our async * event handler was registered, but after anyone attaching * to our disk device polled it. @@ -2987,7 +2987,7 @@ da_zone_cmd(struct cam_periph *periph, union ccb *ccb, error = ENOMEM; goto bailout; } - + if (softc->zone_interface != DA_ZONE_IF_ATA_PASS) { scsi_zbc_in(&ccb->csio, /*retries*/ da_retry_count, @@ -3814,7 +3814,7 @@ out: * single device request, we might have changed the delete * method due to the device incorrectly advertising either * its supported methods or limits. - * + * * To prevent this causing further issues we validate the * against the methods limits, and warn which would * otherwise be unnecessary. @@ -4760,7 +4760,7 @@ dadone_proberc(struct cam_periph *periph, union ccb *d "Attempt to query device " "size failed: %s, %s", sense_key_desc, asc_desc); - } else { + } else { if (have_sense) scsi_sense_print(&done_ccb->csio); else { @@ -4778,7 +4778,7 @@ dadone_proberc(struct cam_periph *periph, union ccb *d * Free up resources. */ cam_periph_invalidate(periph); - } + } } } free(csio->data_ptr, M_SCSIDA); @@ -5069,7 +5069,7 @@ dadone_probebdc(struct cam_periph *periph, union ccb * softc->zone_mode =DA_ZONE_DRIVE_MANAGED; softc->zone_interface = (ata_proto) ? DA_ZONE_IF_ATA_SAT : DA_ZONE_IF_SCSI; - } else if ((bdc->flags & SVPD_ZBC_MASK) != + } else if ((bdc->flags & SVPD_ZBC_MASK) != SVPD_ZBC_NR) { xpt_print(periph->path, "Unknown zoned " "type %#x", @@ -5218,7 +5218,7 @@ dadone_probeata(struct cam_periph *periph, union ccb * /* * If the ATA IDENTIFY failed, we could be talking * to a SCSI drive, although that seems unlikely, - * since the drive did report that it supported the + * since the drive did report that it supported the * ATA Information VPD page. If the ATA IDENTIFY * succeeded, and the SAT layer doesn't support * ZBC -> ZAC translation, continue on to get the @@ -5278,7 +5278,7 @@ dadone_probeatalogdir(struct cam_periph *periph, union */ if ((softc->valid_logdir_len >= ((ATA_IDENTIFY_DATA_LOG + 1) * sizeof(uint16_t))) - && (le16dec(softc->ata_logdir.header) == + && (le16dec(softc->ata_logdir.header) == ATA_GP_LOG_DIR_VERSION) && (le16dec(&softc->ata_logdir.num_pages[ (ATA_IDENTIFY_DATA_LOG * @@ -5298,7 +5298,7 @@ dadone_probeatalogdir(struct cam_periph *periph, union * then ATA logs are effectively not * supported even if the bit is set in the * identify data. - */ + */ softc->flags &= ~(DA_FLAG_CAN_ATA_LOG | DA_FLAG_CAN_ATA_IDLOG); if ((done_ccb->ccb_h.status & @@ -5321,7 +5321,7 @@ dadone_probeatalogdir(struct cam_periph *periph, union xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; - } + } daprobedone(periph, done_ccb); return; } @@ -5412,7 +5412,7 @@ dadone_probeataiddir(struct cam_periph *periph, union xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; - } + } daprobedone(periph, done_ccb); return; } @@ -5487,10 +5487,9 @@ dadone_probeatasup(struct cam_periph *periph, union cc * to an earlier spec, it won't have * the field. So, assume all * commands are supported. - */ + */ softc->zone_flags |= DA_ZONE_FLAG_SUP_MASK; } - } } else { error = daerror(done_ccb, CAM_RETRY_SELTO, @@ -5526,7 +5525,7 @@ dadone_probeatasup(struct cam_periph *periph, union cc xpt_release_ccb(done_ccb); xpt_schedule(periph, priority); return; - } + } daprobedone(periph, done_ccb); return; } @@ -5862,9 +5861,9 @@ static void daprevent(struct cam_periph *periph, int action) { struct da_softc *softc; - union ccb *ccb; + union ccb *ccb; int error; - + cam_periph_assert(periph, MA_OWNED); softc = (struct da_softc *)periph->softc; @@ -6131,7 +6130,7 @@ scsi_read_defects(struct ccb_scsiio *csio, uint32_t re void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, uint8_t list_format, uint32_t addr_desc_index, uint8_t *data_ptr, - uint32_t dxfer_len, int minimum_cmd_size, + uint32_t dxfer_len, int minimum_cmd_size, uint8_t sense_len, uint32_t timeout) { uint8_t cdb_len; @@ -6141,7 +6140,7 @@ scsi_read_defects(struct ccb_scsiio *csio, uint32_t re * need to use the 12 byte command. */ if ((minimum_cmd_size <= 10) - && (addr_desc_index == 0) + && (addr_desc_index == 0) && (dxfer_len <= SRDD10_MAX_LENGTH)) { struct scsi_read_defect_data_10 *cdb10; @@ -6209,7 +6208,7 @@ scsi_sanitize(struct ccb_scsiio *csio, u_int32_t retri #endif /* _KERNEL */ void -scsi_zbc_out(struct ccb_scsiio *csio, uint32_t retries, +scsi_zbc_out(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, uint8_t service_action, uint64_t zone_id, uint8_t zone_flags, uint8_t *data_ptr, uint32_t dxfer_len, @@ -6236,7 +6235,7 @@ scsi_zbc_out(struct ccb_scsiio *csio, uint32_t retries } void -scsi_zbc_in(struct ccb_scsiio *csio, uint32_t retries, +scsi_zbc_in(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, uint8_t service_action, uint64_t zone_start_lba, uint8_t zone_options, uint8_t *data_ptr, uint32_t dxfer_len, @@ -6265,7 +6264,7 @@ scsi_zbc_in(struct ccb_scsiio *csio, uint32_t retries, } int -scsi_ata_zac_mgmt_out(struct ccb_scsiio *csio, uint32_t retries, +scsi_ata_zac_mgmt_out(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, int use_ncq, uint8_t zm_action, uint64_t zone_id, uint8_t zone_flags, @@ -6377,7 +6376,7 @@ bailout: } int -scsi_ata_zac_mgmt_in(struct ccb_scsiio *csio, uint32_t retries, +scsi_ata_zac_mgmt_in(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, int use_ncq, uint8_t zm_action, uint64_t zone_id, uint8_t zone_flags,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811142315.wAENFp4g017475>