Re: [PATCH RFC 1/9] [SCSI] Detect overflow of sense data buffer

2013-01-22 Thread Hannes Reinecke
On 01/22/2013 04:10 PM, Ewan Milne wrote: On Mon, 2013-01-21 at 08:26 +0100, Hannes Reinecke wrote: On 01/18/2013 05:46 PM, James Bottomley wrote: On Fri, 2013-01-18 at 11:27 -0500, Ewan D. Milne wrote: --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -241,6 +241,9 @@ static

[PATCH v14 3/3] scsi: remove can_power_off flag from scsi_device

2013-01-22 Thread Aaron Lu
Commit 166a2967b45ede2e2e56f3ede3cd32053dc17812 "libata: tell scsi layer device supports runtime power off" introduced the can_power_off flag for scsi_device and is used to support ZPODD implementation in SCSI layer. Since ZPODD is now implemented in ATA layer, that flag is no longer needed, so rem

[PATCH v14 2/3] libata: scsi: no poll when ODD is powered off

2013-01-22 Thread Aaron Lu
When the ODD is powered off, any action the user did to the ODD that would generate a media event will trigger an ACPI interrupt, so the poll for media event is no longer necessary. And the poll will also cause a runtime status change, which will stop the ODD from staying in powered off state, so t

[PATCH v14 1/3] scsi: sr: support runtime pm

2013-01-22 Thread Aaron Lu
This patch adds runtime pm support for sr. It did this by increasing the runtime usage_count of the device when its block device is accessed. And decreasing the runtime usage_count of the device when the access is done. If there is media inside, runtime suspend is not allowed as we don't always k

[PATCH v14 0/3] ZPODD Patches

2013-01-22 Thread Aaron Lu
v14: Patches 2-6 and 8 of v13 are already taken by Jeff into libata/upstream, so we just have 3 patches left: patch 1 in v13 -> patch 1 in v14 patch 7 in v13 -> patch 2 in v14 patch 9 in v13 -> patch 3 in v14 Update sr's runtime PM code to take care of audio play as pointed out by Alan Stern in pa

Re: [PATCH 10/15] drivers/scsi/csiostor/csio_lnode.c: adjust duplicate test

2013-01-22 Thread Naresh Kumar Inna
On 1/21/2013 6:32 PM, Julia Lawall wrote: > From: Julia Lawall > > Delete successive tests to the same location. The current value of ln has > been tested already, and is clearly not NULL, given the enclosing if > condition. Furthermore, the result of csio_lnode_alloc is currently > ignored. >

Re: [usb-storage] Re: Fwd: 2TB USB hard drive for backing up

2013-01-22 Thread H. Peter Anvin
Don't worry... I have lived in that world for decades... it's a lot like BIOS. James Bottomley wrote: >On Tue, 2013-01-22 at 11:05 -0600, H. Peter Anvin wrote: >> On 01/22/2013 09:43 AM, Alan Stern wrote: >> > On Tue, 22 Jan 2013, Oliver Neukum wrote: >> > >> >> On Tuesday 22 January 2013 11:05

Re: [PATCH RFC 4/9] [SCSI] Rename scsi_evt_xxx to sdev_evt_xxx and scsi_event to sdev_event

2013-01-22 Thread Bart Van Assche
On Fri, Jan 18, 2013 at 9:27 AM, Ewan D. Milne wrote: > @@ -2206,7 +2206,7 @@ static void scsi_evt_emit(struct scsi_device *sdev, > struct scsi_event *evt) > * Dispatch queued events to their associated scsi_device kobjects > * as uevents. > */ > -void scsi_evt_thread(struct work_st

Re: [PATCH RFC 4/9] [SCSI] Rename scsi_evt_xxx to sdev_evt_xxx and scsi_event to sdev_event

2013-01-22 Thread Bart Van Assche
On Fri, Jan 18, 2013 at 9:27 AM, Ewan D. Milne wrote: > > @@ -2206,7 +2206,7 @@ static void scsi_evt_emit(struct scsi_device *sdev, > struct scsi_event *evt) > * Dispatch queued events to their associated scsi_device kobjects > * as uevents. > */ > -void scsi_evt_thread(struct work_

Re: [usb-storage] Re: Fwd: 2TB USB hard drive for backing up

2013-01-22 Thread James Bottomley
On Tue, 2013-01-22 at 11:05 -0600, H. Peter Anvin wrote: > On 01/22/2013 09:43 AM, Alan Stern wrote: > > On Tue, 22 Jan 2013, Oliver Neukum wrote: > > > >> On Tuesday 22 January 2013 11:05:35 James Bottomley wrote: > May 3 18:19:06 relampago3 kernel: [ 3948.472796] sd 7:0:0:0: [sdf] > 1

Re: [usb-storage] Re: Fwd: 2TB USB hard drive for backing up

2013-01-22 Thread H. Peter Anvin
On 01/22/2013 09:43 AM, Alan Stern wrote: > On Tue, 22 Jan 2013, Oliver Neukum wrote: > >> On Tuesday 22 January 2013 11:05:35 James Bottomley wrote: May 3 18:19:06 relampago3 kernel: [ 3948.472796] sd 7:0:0:0: [sdf] 1565565872 512-byte logical blocks: (801 GB/746 GiB) >>> >>> This look

Re: [usb-storage] Re: Fwd: 2TB USB hard drive for backing up

2013-01-22 Thread Alan Stern
On Tue, 22 Jan 2013, Oliver Neukum wrote: > On Tuesday 22 January 2013 11:05:35 James Bottomley wrote: > > > May 3 18:19:06 relampago3 kernel: [ 3948.472796] sd 7:0:0:0: [sdf] > > > 1565565872 512-byte logical blocks: (801 GB/746 GiB) > > > > This looks like a wrap around of your actual size. T

Re: [PATCH RFC 8/9] [SCSI] Add sense and Unit Attention generation to scsi_debug

2013-01-22 Thread Ewan Milne
On Sat, 2013-01-19 at 13:43 -0500, Douglas Gilbert wrote: > On 13-01-18 11:27 AM, Ewan D. Milne wrote: > > From: "Ewan D. Milne" > > > > Added capability to scsi_debug to generate sense and Unit Attention > > conditions to exercise the enhanced sense and Unit Attention handling. > > > > Signed-off

Re: [PATCH RFC 1/9] [SCSI] Detect overflow of sense data buffer

2013-01-22 Thread Ewan Milne
On Mon, 2013-01-21 at 08:26 +0100, Hannes Reinecke wrote: > On 01/18/2013 05:46 PM, James Bottomley wrote: > > On Fri, 2013-01-18 at 11:27 -0500, Ewan D. Milne wrote: > >> --- a/drivers/scsi/scsi_error.c > >> +++ b/drivers/scsi/scsi_error.c > >> @@ -241,6 +241,9 @@ static int scsi_check_sense(struc

Re: [PATCH RFC 1/9] [SCSI] Detect overflow of sense data buffer

2013-01-22 Thread Ewan Milne
On Fri, 2013-01-18 at 16:46 +, James Bottomley wrote: > On Fri, 2013-01-18 at 11:27 -0500, Ewan D. Milne wrote: > > --- a/drivers/scsi/scsi_error.c > > +++ b/drivers/scsi/scsi_error.c > > @@ -241,6 +241,9 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) > > if (! scsi_command_normaliz

Re: Fwd: 2TB USB hard drive for backing up

2013-01-22 Thread James Bottomley
On Tue, 2013-01-22 at 12:49 +0100, Oliver Neukum wrote: > On Tuesday 22 January 2013 11:05:35 James Bottomley wrote: > > > May 3 18:19:06 relampago3 kernel: [ 3948.472796] sd 7:0:0:0: [sdf] > > > 1565565872 512-byte logical blocks: (801 GB/746 GiB) > > > > This looks like a wrap around of your ac

Re: Fwd: 2TB USB hard drive for backing up

2013-01-22 Thread Oliver Neukum
On Tuesday 22 January 2013 11:05:35 James Bottomley wrote: > > May 3 18:19:06 relampago3 kernel: [ 3948.472796] sd 7:0:0:0: [sdf] > > 1565565872 512-byte logical blocks: (801 GB/746 GiB) > > This looks like a wrap around of your actual size. This appears to > indicate the device isn't replying c

Re: [PATCH v13 8/9] libata: do not suspend port if normal ODD is attached

2013-01-22 Thread Aaron Lu
On Mon, Jan 21, 2013 at 03:42:55PM -0500, Jeff Garzik wrote: > On 01/15/2013 04:21 AM, Aaron Lu wrote: > >For ODDs, the upper layer will poll for media change every few > >seconds, which will make it enter and leave suspend state very > >often. And as each suspend will also cause a hard/soft reset,

Re: Fwd: 2TB USB hard drive for backing up

2013-01-22 Thread James Bottomley
[SCSI and USB lists added, message quoted in entirety] On Sat, 2013-01-19 at 21:40 +, Ellwood Blues wrote: > Hi. > > I've had this problem for so long that today after compiling kernel > 3.7.3 and not getting any improvements I decided to let you know that > some of us still only able to use o

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-22 Thread Aaron Lu
On 01/22/2013 05:13 PM, Oliver Neukum wrote: > On Tuesday 22 January 2013 10:25:31 Aaron Lu wrote: >> On Mon, Jan 21, 2013 at 03:56:43PM +0100, Oliver Neukum wrote: >>> On Monday 21 January 2013 17:11:04 Aaron Lu wrote: It is not easy for the OS to tell if the drive is being used or not s

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-22 Thread Oliver Neukum
On Tuesday 22 January 2013 10:25:31 Aaron Lu wrote: > On Mon, Jan 21, 2013 at 03:56:43PM +0100, Oliver Neukum wrote: > > On Monday 21 January 2013 17:11:04 Aaron Lu wrote: > > > It is not easy for the OS to tell if the drive is being used or not > > > sometimes > > > > > > Alan has reminded me it