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

Commit 52f4acb1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "USB: storage: Allow UICC cards to perform house keeping operations""

parents ac1480d7 16ccbc42
Loading
Loading
Loading
Loading
+0 −8
Original line number Original line Diff line number Diff line
@@ -261,14 +261,6 @@ static int slave_configure(struct scsi_device *sdev)
			sdev->autosuspend_delay = us->sdev_autosuspend_delay;
			sdev->autosuspend_delay = us->sdev_autosuspend_delay;
		}
		}


		/*
		 * This quirk enables sending consecutive TEST_UNIT_READY
		 * commands in WRITE(10) command processing context. Increase
		 * the timeout to 60 seconds.
		 */
		if (us->fflags & US_FL_TUR_AFTER_WRITE)
			blk_queue_rq_timeout(sdev->request_queue, (60 * HZ));

	} else {
	} else {


		/* Non-disk-type devices don't need to blacklist any pages
		/* Non-disk-type devices don't need to blacklist any pages
+0 −36
Original line number Original line Diff line number Diff line
@@ -858,42 +858,6 @@ Retry_Sense:
		srb->result = DID_ERROR << 16;
		srb->result = DID_ERROR << 16;


	last_sector_hacks(us, srb);
	last_sector_hacks(us, srb);

	/*
	 * TMC UICC cards expect 5 TEST_UNIT_READY commands after
	 * writing some data. The card performs the flash related
	 * house keeping operations after receiving these commands.
	 * Send 5 TEST_UNIT_READY commands for every 8 WRITE_10
	 * commands.
	 */
	if (unlikely((us->fflags & US_FL_TUR_AFTER_WRITE) &&
				srb->cmnd[0] == WRITE_10)) {
		int i;
		int temp_result;
		struct scsi_eh_save ses;
		unsigned char cmd[] = {
			TEST_UNIT_READY, 0, 0, 0, 0, 0,
		};

		us->tur_count[srb->device->lun]++;

		if (++us->tur_count[srb->device->lun] == 8) {

			us->tur_count[srb->device->lun] = 0;

			scsi_eh_prep_cmnd(srb, &ses, cmd, 6, 0);
			for (i = 0; i < 5; i++) {
				temp_result = us->transport(us->srb, us);
				if (temp_result != USB_STOR_TRANSPORT_GOOD) {
					usb_stor_dbg(us, "TUR failed %d %d\n",
							i, temp_result);
					break;
				}
			}
			scsi_eh_restore_cmnd(srb, &ses);
		}
	}

	return;
	return;


	/* Error and abort processing: try to resynchronize with the device
	/* Error and abort processing: try to resynchronize with the device
+0 −6
Original line number Original line Diff line number Diff line
@@ -2086,12 +2086,6 @@ UNUSUAL_DEV( 0xed10, 0x7636, 0x0001, 0x0001,
		"Digital MP3 Audio Player",
		"Digital MP3 Audio Player",
		USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ),
		USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ),


/* Reported by Pavankumar Kondeti <pkondeti@codeaurora.org> */
UNUSUAL_DEV(0x0925, 0x9011, 0x0100, 0x0100,
		"TMC",
		"USB DISK",
		USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_TUR_AFTER_WRITE),

/* Control/Bulk transport for all SubClass values */
/* Control/Bulk transport for all SubClass values */
USUAL_DEV(USB_SC_RBC, USB_PR_CB),
USUAL_DEV(USB_SC_RBC, USB_PR_CB),
USUAL_DEV(USB_SC_8020, USB_PR_CB),
USUAL_DEV(USB_SC_8020, USB_PR_CB),
+0 −2
Original line number Original line Diff line number Diff line
@@ -162,8 +162,6 @@ struct us_data {
	int			use_last_sector_hacks;
	int			use_last_sector_hacks;
	int			last_sector_retries;
	int			last_sector_retries;
	int			sdev_autosuspend_delay;
	int			sdev_autosuspend_delay;
	/* consecutive TEST_UNIT_READY commands during write */
	int			tur_count[16];
};
};


/* Convert between us_data and the corresponding Scsi_Host */
/* Convert between us_data and the corresponding Scsi_Host */
+2 −4
Original line number Original line Diff line number Diff line
@@ -67,10 +67,8 @@
		/* Initial READ(10) (and others) must be retried */	\
		/* Initial READ(10) (and others) must be retried */	\
	US_FLAG(WRITE_CACHE,	0x00200000)			\
	US_FLAG(WRITE_CACHE,	0x00200000)			\
		/* Write Cache status is not available */	\
		/* Write Cache status is not available */	\
	US_FLAG(NEEDS_CAP16,	0x00400000)			\
	US_FLAG(NEEDS_CAP16,	0x00400000)
		/* cannot handle READ_CAPACITY_10 */		\
		/* cannot handle READ_CAPACITY_10 */
	US_FLAG(TUR_AFTER_WRITE, 0x00800000)			\
		/* 5 TEST_UNIT_READY after 8 WRITE(10) */


#define US_FLAG(name, value)	US_FL_##name = value ,
#define US_FLAG(name, value)	US_FL_##name = value ,
enum { US_DO_ALL_FLAGS };
enum { US_DO_ALL_FLAGS };