Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0183a33 authored by Felipe Balbi's avatar Felipe Balbi Committed by Greg Kroah-Hartman
Browse files

usb: storage: fix multi-line comment style



No functional changes here, just making sure our
storage driver uses a consistent multi-line comment
style.

Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5b91dfe1
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -829,8 +829,10 @@ static int alauda_write_lba(struct us_data *us, u16 lba,

	pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset];
	if (pba == 1) {
		/* Maybe it is impossible to write to PBA 1.
		   Fake success, but don't do anything. */
		/*
		 * Maybe it is impossible to write to PBA 1.
		 * Fake success, but don't do anything.
		 */
		printk(KERN_WARNING
		       "alauda_write_lba: avoid writing to pba 1\n");
		return USB_STOR_TRANSPORT_GOOD;
@@ -977,10 +979,12 @@ static int alauda_read_data(struct us_data *us, unsigned long address,
			usb_stor_dbg(us, "Read %d zero pages (LBA %d) page %d\n",
				     pages, lba, page);

			/* This is not really an error. It just means
			   that the block has never been written.
			   Instead of returning USB_STOR_TRANSPORT_ERROR
			   it is better to return all zero data. */
			/*
			 * This is not really an error. It just means
			 * that the block has never been written.
			 * Instead of returning USB_STOR_TRANSPORT_ERROR
			 * it is better to return all zero data.
			 */

			memset(buffer, 0, len);
		} else {
@@ -1222,8 +1226,10 @@ static int alauda_transport(struct scsi_cmnd *srb, struct us_data *us)
	}

	if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) {
		/* sure.  whatever.  not like we can stop the user from popping
		   the media out of the device (no locking doors, etc) */
		/*
		 * sure.  whatever.  not like we can stop the user from popping
		 * the media out of the device (no locking doors, etc)
		 */
		return USB_STOR_TRANSPORT_GOOD;
	}

+20 −14
Original line number Diff line number Diff line
@@ -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,7 +208,8 @@ 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.)
@@ -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);
+14 −8
Original line number Diff line number Diff line
/* Driver for Datafab USB Compact Flash reader
/*
 * Driver for Datafab USB Compact Flash reader
 *
 * datafab driver v0.1:
 *
@@ -693,18 +694,23 @@ static int datafab_transport(struct scsi_cmnd *srb, struct us_data *us)
	}

	if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) {
		// sure.  whatever.  not like we can stop the user from
		// popping the media out of the device (no locking doors, etc)
		//
		/*
		 * sure.  whatever.  not like we can stop the user from
		 * popping the media out of the device (no locking doors, etc)
		 */
		return USB_STOR_TRANSPORT_GOOD;
	}

	if (srb->cmnd[0] == START_STOP) {
		/* this is used by sd.c'check_scsidisk_media_change to detect
		   media change */
		/*
		 * this is used by sd.c'check_scsidisk_media_change to detect
		 * media change
		 */
		usb_stor_dbg(us, "START_STOP\n");
		/* the first datafab_id_device after a media change returns
		   an error (determined experimentally) */
		/*
		 * the first datafab_id_device after a media change returns
		 * an error (determined experimentally)
		 */
		rc = datafab_id_device(us, info);
		if (rc == USB_STOR_TRANSPORT_GOOD) {
			info->sense_key = NO_SENSE;
+2 −1
Original line number Diff line number Diff line
/* Driver for USB Mass Storage compliant devices
/*
 * Driver for USB Mass Storage compliant devices
 * Debugging Functions Source Code File
 *
 * Current development and maintenance by:
+2 −1
Original line number Diff line number Diff line
/* Driver for USB Mass Storage compliant devices
/*
 * Driver for USB Mass Storage compliant devices
 * Debugging Functions Header File
 *
 * Current development and maintenance by:
Loading