diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-09-11 04:34:46 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-09-11 04:34:46 -0300 |
commit | 863981e96738983919de841ec669e157e6bdaeb0 (patch) | |
tree | d6d89a12e7eb8017837c057935a2271290907f76 /drivers/usb/storage/cypress_atacb.c | |
parent | 8dec7c70575785729a6a9e6719a955e9c545bcab (diff) |
Linux-libre 4.7.1-gnupck-4.7.1-gnu
Diffstat (limited to 'drivers/usb/storage/cypress_atacb.c')
-rw-r--r-- | drivers/usb/storage/cypress_atacb.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/usb/storage/cypress_atacb.c b/drivers/usb/storage/cypress_atacb.c index c80d3dec9..5e4af44d7 100644 --- a/drivers/usb/storage/cypress_atacb.c +++ b/drivers/usb/storage/cypress_atacb.c @@ -110,13 +110,17 @@ static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) /* first build the ATACB command */ srb->cmd_len = 16; - srb->cmnd[0] = 0x24; /* bVSCBSignature : vendor-specific command - this value can change, but most(all ?) manufacturers - keep the cypress default : 0x24 */ + srb->cmnd[0] = 0x24; /* + * bVSCBSignature : vendor-specific command + * this value can change, but most(all ?) manufacturers + * keep the cypress default : 0x24 + */ srb->cmnd[1] = 0x24; /* bVSCBSubCommand : 0x24 for ATACB */ - srb->cmnd[3] = 0xff - 1; /* features, sector count, lba low, lba med - lba high, device, command are valid */ + srb->cmnd[3] = 0xff - 1; /* + * features, sector count, lba low, lba med + * lba high, device, command are valid + */ srb->cmnd[4] = 1; /* TransferBlockCount : 512 */ if (save_cmnd[0] == ATA_16) { @@ -155,8 +159,7 @@ static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) usb_stor_transparent_scsi_command(srb, us); - /* if the device doesn't support ATACB - */ + /* if the device doesn't support ATACB */ if (srb->result == SAM_STAT_CHECK_CONDITION && memcmp(srb->sense_buffer, usb_stor_sense_invalidCDB, sizeof(usb_stor_sense_invalidCDB)) == 0) { @@ -164,7 +167,8 @@ static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) goto end; } - /* if ck_cond flags is set, and there wasn't critical error, + /* + * if ck_cond flags is set, and there wasn't critical error, * build the special sense */ if ((srb->result != (DID_ERROR << 16) && @@ -176,11 +180,11 @@ static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) unsigned char *desc = sb + 8; int tmp_result; - /* build the command for - * reading the ATA registers */ + /* build the command for reading the ATA registers */ scsi_eh_prep_cmnd(srb, &ses, NULL, 0, sizeof(regs)); - /* we use the same command as before, but we set + /* + * we use the same command as before, but we set * the read taskfile bit, for not executing atacb command, * but reading register selected in srb->cmnd[4] */ @@ -204,10 +208,11 @@ static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) sb[2] = 0; /* ATA PASS THROUGH INFORMATION AVAILABLE */ sb[3] = 0x1D; - /* XXX we should generate sk, asc, ascq from status and error + /* + * XXX we should generate sk, asc, ascq from status and error * regs * (see 11.1 Error translation ATA device error to SCSI error - * map, and ata_to_sense_error from libata.) + * map, and ata_to_sense_error from libata.) */ /* Sense data is current and format is descriptor. */ @@ -258,7 +263,8 @@ static int cypress_probe(struct usb_interface *intf, if (result) return result; - /* Among CY7C68300 chips, the A revision does not support Cypress ATACB + /* + * Among CY7C68300 chips, the A revision does not support Cypress ATACB * Filter out this revision from EEPROM default descriptor values */ device = interface_to_usbdev(intf); |