Re: [PATCH v7 3/4] block: implement runtime pm strategy

2013-01-18 Thread Aaron Lu
On 01/18/2013 11:26 PM, Alan Stern wrote: On Fri, 18 Jan 2013, Aaron Lu wrote: Either you have to make sure the q->nr_pending is always correct, even when runtime PM isn't being used, or else the caller has to make sure that no I/O takes place before blk_pm_runtime_init is called. I think we

Re: [patch] target: change sprintf to snprintf

2013-01-18 Thread Dan Carpenter
On Fri, Jan 18, 2013 at 11:36:52AM -0800, Nicholas A. Bellinger wrote: > On Fri, 2013-01-18 at 16:05 +0300, Dan Carpenter wrote: > > "buf" is 128 characters and "vpd->device_identifier" is 256. It makes > > the static checkers complain. > > > > Signed-off-by: Dan Carpenter > > --- > > Applied t

Re: [PATCH v7 4/4] sd: change to auto suspend mode

2013-01-18 Thread Alan Stern
On Wed, 16 Jan 2013, Aaron Lu wrote: > From: Lin Ming > > Uses block layer runtime pm helper functions in > scsi_runtime_suspend/resume. > Remove scsi_autopm_* from sd open/release path and check_events path. > And remove the quiesce call in runtime suspend path, as we know there is > no request

Re: [PATCH] scsi:gdth.c: fix compilation warning

2013-01-18 Thread Cong Ding
Hi all, is this still in the queue or...? - cong On Mon, Dec 3, 2012 at 11:19 AM, Cong Ding wrote: > We do not allow old-style function definition. Always spell foo(void) if > a function does not take any parameters. > > Signed-off-by: Cong Ding > --- > drivers/scsi/gdth.c |2 +- > 1 file

Re: [patch] target: change sprintf to snprintf

2013-01-18 Thread Nicholas A. Bellinger
On Fri, 2013-01-18 at 16:05 +0300, Dan Carpenter wrote: > "buf" is 128 characters and "vpd->device_identifier" is 256. It makes > the static checkers complain. > > Signed-off-by: Dan Carpenter > --- Applied to target-pending/for-next. > Probably we should just raise VPD_TMP_BUF_SIZE to 300. A

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

2013-01-18 Thread James Bottomley
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_normalize_sense(scmd, &sshdr)) > return FAILED; /* no valid

[PATCH RFC 6/9] [SCSI] Generate uevents for certain Unit Attention codes

2013-01-18 Thread Ewan D. Milne
From: "Ewan D. Milne" Generate a uevent on the scsi_target object when the following Unit Attention ASC/ASCQ code is received: 3F/0E REPORTED LUNS DATA HAS CHANGED Generate a uevent on the scsi_device object when the following Unit Attention ASC/ASCQ codes are received: 2A/01 MODE PA

[PATCH RFC 7/9] [SCSI] Add sysfs support for enhanced Unit Attention handling

2013-01-18 Thread Ewan D. Milne
From: "Ewan D. Milne" Added support for additional scsi_device events in sysfs, as well as support for scsi_target events. Also added "rescan" node in scsi_target sysfs to permit targets to be rescanned from udev rules in a more straightforward way. Signed-off-by: Ewan D. Milne --- drivers/sc

[PATCH RFC 9/9] [SCSI] Streamline detection of FM/EOM/ILI status

2013-01-18 Thread Ewan D. Milne
From: "Ewan D. Milne" Avoid duplicate tests when examining sense data for FM/EOM/ILI bits. Moved extraction of status to scsi_normalize_sense() if the config option CONFIG_SCSI_ENHANCED_UA is used, because descriptor format sense data is already being parsed there. Signed-off-by: Ewan D. Milne

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

2013-01-18 Thread Ewan D. Milne
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-by: Ewan D. Milne --- drivers/scsi/scsi_debug.c | 133 ++ 1 file changed, 133

[PATCH RFC 5/9] [SCSI] Add support for scsi_target events

2013-01-18 Thread Ewan D. Milne
From: "Ewan D. Milne" Added capability to generate uevents on scsi_target objects. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_lib.c| 135 + drivers/scsi/scsi_priv.h | 3 + drivers/scsi/scsi_scan.c | 17 ++ include/scsi/scsi_dev

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

2013-01-18 Thread Ewan D. Milne
From: "Ewan D. Milne" The names of the struct and some of the functions for scsi_device events are too generic and do not match the comments in the source. Changed all of the names to begin with sdev_ in order to avoid naming issues and confusion with scsi_target events to be added. Signed-off-b

[PATCH RFC 2/9] [SCSI] Generate uevent on sd capacity change

2013-01-18 Thread Ewan D. Milne
From: "Ewan D. Milne" In sd_read_capacity(), detect if the capacity is different from the previously read value, and generate a uevent if this is the case. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_lib.c| 5 - drivers/scsi/scsi_sysfs.c | 2 ++ drivers/scsi/sd.c | 9 +

[PATCH RFC 3/9] [SCSI] Add a kernel config option for enhanced Unit Attention support

2013-01-18 Thread Ewan D. Milne
From: "Ewan D. Milne" Added CONFIG_SCSI_ENHANCED_UA kernel config option to enable changes in the SCSI mid-layer which detect and report certain Unit Attention conditions reported by devices. These changes are primarily useful when storage arrays that can be reconfigured are being used, so the c

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

2013-01-18 Thread Ewan D. Milne
From: "Ewan D. Milne" Added code to SCSI mid-layer sense processing to detect the SDAT_OVFL bit in Fixed or Descriptor format sense data, and log a kernel message if the device reported that the sense data did not fit in the buffer. Signed-off-by: Ewan D. Milne --- drivers/scsi/scsi_debug.c |

[PATCH RFC 0/9] [SCSI] Enhanced sense and Unit Attention handling

2013-01-18 Thread Ewan D. Milne
From: "Ewan D. Milne" This patch set adds changes to the SCSI mid-layer, sysfs and scsi_debug to provide enhanced support for Unit Attention conditions, as well as detection of reported sense data overflow conditions and some changes to sense data processing. It also adds a uevent when the repor

Re: [PATCH v7 3/4] block: implement runtime pm strategy

2013-01-18 Thread Alan Stern
On Fri, 18 Jan 2013, Aaron Lu wrote: > > Either you have to make sure the q->nr_pending is always correct, even > > when runtime PM isn't being used, or else the caller has to make sure > > that no I/O takes place before blk_pm_runtime_init is called. > > I think we can say: > blk_pm_runtime_in

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

2013-01-18 Thread Alan Stern
On Fri, 18 Jan 2013, Aaron Lu wrote: > > Aaron, have you checked whether this patch works okay when you play a > > track on an audio-only CD on the computer? The block interface looks > > okay but I'm not sure about the cdrom_device interface. > > Just verified it works OK with the whole patchs

[patch] target: change sprintf to snprintf

2013-01-18 Thread Dan Carpenter
"buf" is 128 characters and "vpd->device_identifier" is 256. It makes the static checkers complain. Signed-off-by: Dan Carpenter --- Probably we should just raise VPD_TMP_BUF_SIZE to 300. diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index bd587b7

Re: Talking to reset disk without device node

2013-01-18 Thread Hannes Reinecke
On 01/18/2013 11:08 AM, Jan Engelhardt wrote: I have here a system with Linux 3.4.4 and what seems to be flakey PCI bridge hardware, as it has occurred previously on different SATA controllers and had fixed itself up after a reboot. Anyhow, as a result of the disk "disappearing", sd_mod will de

Talking to reset disk without device node

2013-01-18 Thread Jan Engelhardt
I have here a system with Linux 3.4.4 and what seems to be flakey PCI bridge hardware, as it has occurred previously on different SATA controllers and had fixed itself up after a reboot. Anyhow, as a result of the disk "disappearing", sd_mod will deregister it so that /dev/sdl will be invalid/cle

Re: [PATCH v7 3/4] block: implement runtime pm strategy

2013-01-18 Thread Aaron Lu
On Thu, Jan 17, 2013 at 10:11:31AM -0500, Alan Stern wrote: > On Thu, 17 Jan 2013, Aaron Lu wrote: > > > > > @@ -515,6 +516,27 @@ void elv_bio_merged(struct request_queue *q, > > > > struct request *rq, > > > > e->type->ops.elevator_bio_merged_fn(q, rq, bio); > > > > } > > > >