[PATCH] st: clear ILI if Medium Error

2016-04-17 Thread Kai Makisara
Some drives set the ILI flag together with MEDIUM ERROR
sense code. Clear the ILI flag in this case so that the
medium error will be handled. The problem was reported by
Maurizio Lombardi.

Signed-off-by: Kai Mäkisara 
---
 drivers/scsi/st.c |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/drivers/scsi/st.c 2016-04-17 21:22:15.671897001 +0300
+++ b/drivers/scsi/st.c 2016-04-17 22:25:39.234321293 +0300
@@ -1974,9 +1974,12 @@ static long read_tape(struct scsi_tape *
transfer = (int)cmdstatp->uremainder64;
else
transfer = 0;
-   if (STp->block_size == 0 &&
-   cmdstatp->sense_hdr.sense_key == 
MEDIUM_ERROR)
-   transfer = bytes;
+   if (cmdstatp->sense_hdr.sense_key == 
MEDIUM_ERROR) {
+   if (STp->block_size == 0)
+   transfer = bytes;
+   /* Some drives set ILI with MEDIUM 
ERROR */
+   cmdstatp->flags &= ~SENSE_ILI;
+   }
 
if (cmdstatp->flags & SENSE_ILI) {  /* ILI 
*/
if (STp->block_size == 0 &&

Re: [patch] bnx2i: silence uninitialized variable warnings

2016-04-17 Thread Nilesh Javali


On 14/04/16 3:10 PM, "Dan Carpenter"  wrote:

>Presumably it isn't possible to have empty lists here, but my static
>checker doesn't know that and complains that "ep" can be used
>uninitialized.
>
>Signed-off-by: Dan Carpenter 
>
>diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c
>b/drivers/scsi/bnx2i/bnx2i_iscsi.c
>index 7289437..133901f 100644
>--- a/drivers/scsi/bnx2i/bnx2i_iscsi.c
>+++ b/drivers/scsi/bnx2i/bnx2i_iscsi.c
>@@ -675,7 +675,7 @@ bnx2i_find_ep_in_ofld_list(struct bnx2i_hba *hba, u32
>iscsi_cid)
> {
>   struct list_head *list;
>   struct list_head *tmp;
>-  struct bnx2i_endpoint *ep;
>+  struct bnx2i_endpoint *ep = NULL;
> 
>   read_lock_bh(&hba->ep_rdwr_lock);
>   list_for_each_safe(list, tmp, &hba->ep_ofld_list) {
>@@ -703,7 +703,7 @@ bnx2i_find_ep_in_destroy_list(struct bnx2i_hba *hba,
>u32 iscsi_cid)
> {
>   struct list_head *list;
>   struct list_head *tmp;
>-  struct bnx2i_endpoint *ep;
>+  struct bnx2i_endpoint *ep = NULL;
> 
>   read_lock_bh(&hba->ep_rdwr_lock);
>   list_for_each_safe(list, tmp, &hba->ep_destroy_list) {

Acked-by: Nilesh Javali 

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: EXPORT_SYMBOL(scsi_use_blk_mq);

2016-04-17 Thread Christoph Hellwig
On Sat, Apr 16, 2016 at 09:55:48PM -0400, Douglas Gilbert wrote:
> Is there a good reason why 'bool scsi_use_blk_mq' declared as
> extern in scsi_hosts.h is not an exported symbol?

Yes, no module has any business looking at the symbol.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Jsem Mr.Peter Wong

2016-04-17 Thread Mr. peter wong
Pozdravy a komplimenty.
 
Jsem Mr.Peter Wong pracuji s Bank of China Mám návrh podnikat v melodii US $ 
22.500.000 milionu, které mají být prevedeny na zahranicním úctu s vaší pomoc, 
pokud chtejí.

V prípade zájmu Vám pošlu veškeré údaje o transakcích na obdržení odpovedi. 
Mužete me kontaktovat na muj soukromý e-mail :(peterwon...@qq.com) a poslat mi 
následující informace pro úcely dokumentace

1) Úplné názvy 
2) Aktuální Obytná Adresa 
3) Soukromé telefonní císlo,
   
S prátelským pozdravem,
Mr.Peter Wong
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] lpfc: remove incorrect lockdep assertion

2016-04-17 Thread Sebastian Herbszt
Remove incorrect lockdep assertion from lpfc_sli_hbqbuf_find() which acquires
the hbalock itself. Fix the comment which resulted in this mistake.

Fixes: 1c2ba475eb0e ("lpfc: Add lockdep assertions")
Signed-off-by: Sebastian Herbszt 

diff -uNr -U 5 a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
--- a/drivers/scsi/lpfc/lpfc_sli.c  2016-03-15 03:25:44.324554218 +0100
+++ b/drivers/scsi/lpfc/lpfc_sli.c  2016-04-17 13:01:59.700182669 +0200
@@ -1998,24 +1998,21 @@
 /**
  * lpfc_sli_hbqbuf_find - Find the hbq buffer associated with a tag
  * @phba: Pointer to HBA context object.
  * @tag: Tag of the hbq buffer.
  *
- * This function is called with hbalock held. This function searches
- * for the hbq buffer associated with the given tag in the hbq buffer
- * list. If it finds the hbq buffer, it returns the hbq_buffer other wise
- * it returns NULL.
+ * This function searches for the hbq buffer associated with the given tag in
+ * the hbq buffer list. If it finds the hbq buffer, it returns the hbq_buffer
+ * otherwise it returns NULL.
  **/
 static struct hbq_dmabuf *
 lpfc_sli_hbqbuf_find(struct lpfc_hba *phba, uint32_t tag)
 {
struct lpfc_dmabuf *d_buf;
struct hbq_dmabuf *hbq_buf;
uint32_t hbqno;
 
-   lockdep_assert_held(&phba->hbalock);
-
hbqno = tag >> 16;
if (hbqno >= LPFC_MAX_HBQS)
return NULL;
 
spin_lock_irq(&phba->hbalock);
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 41/42] block: do not use REQ_FLUSH for tracking flush support

2016-04-17 Thread Juergen Gross
On 15/04/16 21:16, mchri...@redhat.com wrote:
> From: Mike Christie 
> 
> The last patch added a REQ_OP_FLUSH for request_fn drivers
> and the next patch renames REQ_FLUSH to REQ_PREFLUSH which
> will be used by file systems and make_request_fn drivers so
> they can send a write/flush combo.
> 
> This patch drops xen's use of REQ_FLUSH to track if it supports
> REQ_OP_FLUSH requests, so REQ_FLUSH can be deleted.
> 
> v7:
> - Fix feature_flush/fua use.
> 
> v6:
> - Dropped parts of patch handled by Jens's QUEUE_FLAG_WC/FUA
> patches and modified patch to check feature_flush/fua bits.
> 
> Signed-off-by: Mike Christie 
> Reviewed-by: Hannes Reinecke 
> Cc: Juergen Gross 

Acked-by: Juergen Gross 


Juergen
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html