svn commit: r350704 - in stable/12/sys/cam: ata scsi
Alexander Motin
mav at FreeBSD.org
Thu Aug 8 00:18:37 UTC 2019
Author: mav
Date: Thu Aug 8 00:18:36 2019
New Revision: 350704
URL: https://svnweb.freebsd.org/changeset/base/350704
Log:
MFC r340448 (by imp): Remove trailing white space in advance of other changes.
Modified:
stable/12/sys/cam/ata/ata_da.c
stable/12/sys/cam/scsi/scsi_da.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/cam/ata/ata_da.c
==============================================================================
--- stable/12/sys/cam/ata/ata_da.c Thu Aug 8 00:17:16 2019 (r350703)
+++ stable/12/sys/cam/ata/ata_da.c Thu Aug 8 00:18:36 2019 (r350704)
@@ -994,7 +994,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
@@ -1018,7 +1018,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;
@@ -1042,7 +1042,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
*/
@@ -1075,7 +1075,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);
@@ -1265,7 +1264,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;
@@ -2155,7 +2154,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,
@@ -2996,7 +2995,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 *
@@ -3016,7 +3015,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 &
@@ -3126,7 +3125,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;
}
@@ -3190,11 +3189,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,
@@ -3231,7 +3229,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;
}
@@ -3315,7 +3313,6 @@ adadone(struct cam_periph *periph, union ccb *done_ccb
/*getcount_only*/0);
}
}
-
}
free(ataio->data_ptr, M_ATADA);
@@ -3382,7 +3379,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);
@@ -3596,7 +3593,7 @@ adaresume(void *arg)
/*openings*/0,
/*timeout*/0,
/*getcount_only*/0);
-
+
cam_periph_unlock(periph);
}
}
Modified: stable/12/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/12/sys/cam/scsi/scsi_da.c Thu Aug 8 00:17:16 2019 (r350703)
+++ stable/12/sys/cam/scsi/scsi_da.c Thu Aug 8 00:18:36 2019 (r350704)
@@ -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;
@@ -698,7 +698,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
@@ -1389,9 +1389,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
},
{
@@ -1811,7 +1811,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;
@@ -1864,7 +1864,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);
@@ -1891,7 +1891,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.
*/
@@ -1948,7 +1948,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");
}
@@ -2044,7 +2044,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;
@@ -2260,7 +2260,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 support");
@@ -2269,7 +2269,7 @@ dasysctlinit(void *context, int pending)
SYSCTL_CHILDREN(softc->sysctl_tree),
OID_AUTO,
"rotating",
- CTLFLAG_RD,
+ CTLFLAG_RD,
&softc->rotating,
0,
"Rotating media");
@@ -2683,7 +2683,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);
@@ -2782,7 +2782,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) {
@@ -2860,7 +2860,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.
@@ -3024,7 +3024,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,
@@ -3859,7 +3859,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.
@@ -4808,7 +4808,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 {
@@ -4826,7 +4826,7 @@ dadone_proberc(struct cam_periph *periph, union ccb *d
* Free up resources.
*/
cam_periph_invalidate(periph);
- }
+ }
}
}
free(csio->data_ptr, M_SCSIDA);
@@ -5117,7 +5117,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",
@@ -5266,7 +5266,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
@@ -5326,7 +5326,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 *
@@ -5346,7 +5346,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 &
@@ -5369,7 +5369,7 @@ dadone_probeatalogdir(struct cam_periph *periph, union
xpt_release_ccb(done_ccb);
xpt_schedule(periph, priority);
return;
- }
+ }
daprobedone(periph, done_ccb);
return;
}
@@ -5460,7 +5460,7 @@ dadone_probeataiddir(struct cam_periph *periph, union
xpt_release_ccb(done_ccb);
xpt_schedule(periph, priority);
return;
- }
+ }
daprobedone(periph, done_ccb);
return;
}
@@ -5535,10 +5535,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,
@@ -5574,7 +5573,7 @@ dadone_probeatasup(struct cam_periph *periph, union cc
xpt_release_ccb(done_ccb);
xpt_schedule(periph, priority);
return;
- }
+ }
daprobedone(periph, done_ccb);
return;
}
@@ -5910,9 +5909,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;
@@ -6185,7 +6184,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;
@@ -6195,7 +6194,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;
@@ -6263,7 +6262,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,
@@ -6290,7 +6289,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,
@@ -6319,7 +6318,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,
@@ -6431,7 +6430,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,
More information about the svn-src-stable-12
mailing list