Re: [PATCH v4 4/4] scsi: ufs: inject errors to verify error handling

2015-03-10 Thread Gilad Broner
>> +static bool inject_cmd_hang_tr(struct ufs_hba *hba) >> +{ >> + int tag; >> + >> + tag = find_first_bit(&hba->outstanding_reqs, hba->nutrs); >> + if (tag == hba->nutrs) >> + return 0; >> + >> + __clear_bit(tag, &hba->outstanding_reqs); >> + hba->lrb[ta

Re: [PATCH] drivers: scsi: ufs: Fix possible null derefrence

2015-03-10 Thread Gilad Broner
> Check for null before being dereferenced to avoid a invalid null > dereference. > > Found using Coccinelle. > > Signed-off-by: Tapasweni Pathak > Acked-by: Julia Lawall > --- > drivers/scsi/ufs/ufshcd.c |7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/

Re: [PATCH] SCSI:STORVSC Use SCSI layer to allocate memory for per-command device request data

2015-03-10 Thread Olaf Hering
On Mon, Dec 29, Christoph Hellwig wrote: > +++ b/drivers/scsi/storvsc_drv.c > static struct scsi_host_template scsi_driver = { > .module = THIS_MODULE, > .name = "storvsc_host_t", > + .cmd_size = sizeof(struct storvsc_cmd_request), >

[PATCH v5 0/3] Add ioctl and debug utilities to UFS driver

2015-03-10 Thread Gilad Broner
Changes from V4: Dropped error injection change titled: scsi: ufs: inject errors to verify error handling Dolev Raviv (1): scsi: ufs: add ioctl interface for query request Gilad Broner (1): scsi: ufs: add trace events and dump prints for debug Lee Susman (1): scsi: ufs: add debugfs for ufs

[PATCH v5 1/3] scsi: ufs: add ioctl interface for query request

2015-03-10 Thread Gilad Broner
From: Dolev Raviv This patch exposes the ioctl interface for UFS driver via SCSI device ioctl interface. As of now UFS driver would provide the ioctl for query interface to connected UFS device. Signed-off-by: Dolev Raviv Signed-off-by: Noa Rubens Signed-off-by: Raviv Shvili Signed-off-by: Ya

[PATCH v5 3/3] scsi: ufs: add trace events and dump prints for debug

2015-03-10 Thread Gilad Broner
Add trace events to driver to allow monitoring and profilig of activities such as PM suspend/resume, hibernate enter/exit, clock gating and clock scaling up/down. In addition, add UFS host controller register dumps to provide detailed information in case of errors to assist in analysis of issues.

[PATCH v5 2/3] scsi: ufs: add debugfs for ufs

2015-03-10 Thread Gilad Broner
From: Lee Susman Adding debugfs capability for ufshcd. debugfs attributes introduced in this patch: - View driver/controller runtime data - Command tag statistics for performance analisis - Dump device descriptor info - Track recoverable errors statistics during runtime - Change UFS power m

Re: [TOPIC] scsi-queue tree past and future

2015-03-10 Thread Tomas Henzl
On 03/05/2015 02:31 PM, Christoph Hellwig wrote: > For about 8 month I've merged almost every scsi commit through the > scsi-queue staging tree, and it seems to have worked out well enough. >From my user perspective the scsi-queue was an important help and have been >using using it a lot. I hope

[PATCH v4] xen-scsiback: define a pr_fmt macro with xen-pvscsi

2015-03-10 Thread Tao Chen
Add the {xen-pvscsi: } prefix in pr_fmt and remove DPRINTK, then replace all DPRINTK with pr_debug. Also fixed up some comments just as eliminate redundant whitespace and format the code. These will make the code easier to read. Signed-off-by: Tao Chen --- drivers/xen/xen-scsiback.c | 75 +

Re: [PATCH v4 4/4] scsi: ufs: inject errors to verify error handling

2015-03-10 Thread Akinobu Mita
2015-03-10 19:20 GMT+09:00 Gilad Broner : >>> +static bool inject_cmd_hang_tr(struct ufs_hba *hba) >>> +{ >>> + int tag; >>> + >>> + tag = find_first_bit(&hba->outstanding_reqs, hba->nutrs); >>> + if (tag == hba->nutrs) >>> + return 0; >>> + >>> + __clear_bit(t

Re: [PATCH] SCSI:STORVSC Use SCSI layer to allocate memory for per-command device request data

2015-03-10 Thread Christoph Hellwig
On Tue, Mar 10, 2015 at 12:42:33PM +0100, Olaf Hering wrote: > It would be nice to change .proc_name to KBUILD_MODNAME before v4.0 is > released. We carry a patch which adds this field. Of cource we can just > change the patch, but if code gets touched upstream anyway... Please send a patch. Woul

Re: [PATCH v5 3/3] scsi: ufs: add trace events and dump prints for debug

2015-03-10 Thread Steven Rostedt
On Tue, 10 Mar 2015 13:47:15 +0200 Gilad Broner wrote: > +++ b/include/trace/events/ufs.h > @@ -0,0 +1,227 @@ > +/* > + * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms

Re: [PATCH] SCSI:STORVSC Use SCSI layer to allocate memory for per-command device request data

2015-03-10 Thread Olaf Hering
On Tue, Mar 10, Christoph Hellwig wrote: > On Tue, Mar 10, 2015 at 12:42:33PM +0100, Olaf Hering wrote: > > It would be nice to change .proc_name to KBUILD_MODNAME before v4.0 is > > released. We carry a patch which adds this field. Of cource we can just > > change the patch, but if code gets touc

[PATCH] storvsc: use KBUILD_MODNAME to fill .proc_name

2015-03-10 Thread Olaf Hering
Since the previous patch ead3700d893654d440edcb66fb3767a0c0db54cf ("storvsc: use cmd_size to allocate per-command data") fills .proc_name now anyway give it a usable content for v4.0. Old mkinitrd in SLES makes use of this variable to find the required storage driver. Signed-off-by: Olaf Hering -

Re: [PATCH 1/3] scsi: serialize ->rescan against ->remove

2015-03-10 Thread Hannes Reinecke
On 02/02/2015 08:01 AM, Christoph Hellwig wrote: > Lock the device embedded in the scsi_device to protect against > concurrent calls to ->remove. > > Signed-off-by: Christoph Hellwig > Acked-by: Alan Stern Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

Re: [PATCH 2/3] sd: don't grab a device references from driver methods

2015-03-10 Thread Hannes Reinecke
On 02/02/2015 08:01 AM, Christoph Hellwig wrote: > The device model already takes care of races between ->remove and > ->shutdown vs its other methods, and we now take care about locking > them out for ->rescan as well. > > This is a partial revert of commit 39b7f1 ("[SCSI] sd: Fix refcounting").

Re: [PATCH 3/3] scsi: proper state checking and module refcount handling in scsi_device_get

2015-03-10 Thread Hannes Reinecke
On 02/02/2015 08:01 AM, Christoph Hellwig wrote: > This effectively reverts commits 85b6c7 ("[SCSI] sd: fix cache flushing on > module removal (and individual device removal)" and dc4515ea ("scsi: always > increment reference count"). > > We now never call scsi_device_get from the shutdown path, a

[PATCH RESEND v6] st implement tape statistics

2015-03-10 Thread Seymour, Shane M
The following patch exposes statistics for the st driver via sysfs. There is a need for companies with large numbers of tape drives numbering in the tens of thousands to track the performance of those tape drives (e.g. when a backup exceeds its window). The statistics provided should allow the calc

OOPS: unplugging western digital passport drive

2015-03-10 Thread Stanisław Pitucha
Hi linux-scsi, I've got another case of reproducible crash when unplugging western digital passport drives. This was mentioned before in http://www.spinics.net/lists/linux-scsi/msg82603.html Is there any way I can get a more correct stacktrace of the original bug without changing/recompiling the k