Commit ad2be379 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a set of six patches consisting of:
   - two MAINTAINER updates
   - two scsi-mq fixs for the old parallel interface (not every request
     is tagged and we need to set the right flags to populate the SPI
     tag message)
   - a fix for a memory leak in scatterlist traversal caused by a
     preallocation update in 3.17
   - an ipv6 fix for cxgbi"

[ The scatterlist fix also came in separately through the block layer tree ]

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  MAINTAINERS: ufs - remove self
  MAINTAINERS: change hpsa and cciss maintainer
  libcxgbi : support ipv6 address host_param
  scsi: set REQ_QUEUE for the blk-mq case
  Revert "block: all blk-mq requests are tagged"
  lib/scatterlist: fix memory leak with scsi-mq
parents 12267166 ff150a76
...@@ -4312,8 +4312,10 @@ F: Documentation/blockdev/cpqarray.txt ...@@ -4312,8 +4312,10 @@ F: Documentation/blockdev/cpqarray.txt
F: drivers/block/cpqarray.* F: drivers/block/cpqarray.*
HEWLETT-PACKARD SMART ARRAY RAID DRIVER (hpsa) HEWLETT-PACKARD SMART ARRAY RAID DRIVER (hpsa)
M: "Stephen M. Cameron" <scameron@beardog.cce.hp.com> M: Don Brace <don.brace@pmcs.com>
L: iss_storagedev@hp.com L: iss_storagedev@hp.com
L: storagedev@pmcs.com
L: linux-scsi@vger.kernel.org
S: Supported S: Supported
F: Documentation/scsi/hpsa.txt F: Documentation/scsi/hpsa.txt
F: drivers/scsi/hpsa*.[ch] F: drivers/scsi/hpsa*.[ch]
...@@ -4321,8 +4323,10 @@ F: include/linux/cciss*.h ...@@ -4321,8 +4323,10 @@ F: include/linux/cciss*.h
F: include/uapi/linux/cciss*.h F: include/uapi/linux/cciss*.h
HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss) HEWLETT-PACKARD SMART CISS RAID DRIVER (cciss)
M: Mike Miller <mike.miller@hp.com> M: Don Brace <don.brace@pmcs.com>
L: iss_storagedev@hp.com L: iss_storagedev@hp.com
L: storagedev@pmcs.com
L: linux-scsi@vger.kernel.org
S: Supported S: Supported
F: Documentation/blockdev/cciss.txt F: Documentation/blockdev/cciss.txt
F: drivers/block/cciss* F: drivers/block/cciss*
...@@ -9606,7 +9610,6 @@ F: drivers/staging/unisys/ ...@@ -9606,7 +9610,6 @@ F: drivers/staging/unisys/
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
M: Vinayak Holikatti <vinholikatti@gmail.com> M: Vinayak Holikatti <vinholikatti@gmail.com>
M: Santosh Y <santoshsy@gmail.com>
L: linux-scsi@vger.kernel.org L: linux-scsi@vger.kernel.org
S: Supported S: Supported
F: Documentation/scsi/ufs.txt F: Documentation/scsi/ufs.txt
......
...@@ -399,6 +399,35 @@ EXPORT_SYMBOL_GPL(cxgbi_hbas_add); ...@@ -399,6 +399,35 @@ EXPORT_SYMBOL_GPL(cxgbi_hbas_add);
* If the source port is outside our allocation range, the caller is * If the source port is outside our allocation range, the caller is
* responsible for keeping track of their port usage. * responsible for keeping track of their port usage.
*/ */
static struct cxgbi_sock *find_sock_on_port(struct cxgbi_device *cdev,
unsigned char port_id)
{
struct cxgbi_ports_map *pmap = &cdev->pmap;
unsigned int i;
unsigned int used;
if (!pmap->max_connect || !pmap->used)
return NULL;
spin_lock_bh(&pmap->lock);
used = pmap->used;
for (i = 0; used && i < pmap->max_connect; i++) {
struct cxgbi_sock *csk = pmap->port_csk[i];
if (csk) {
if (csk->port_id == port_id) {
spin_unlock_bh(&pmap->lock);
return csk;
}
used--;
}
}
spin_unlock_bh(&pmap->lock);
return NULL;
}
static int sock_get_port(struct cxgbi_sock *csk) static int sock_get_port(struct cxgbi_sock *csk)
{ {
struct cxgbi_device *cdev = csk->cdev; struct cxgbi_device *cdev = csk->cdev;
...@@ -749,6 +778,7 @@ static struct cxgbi_sock *cxgbi_check_route6(struct sockaddr *dst_addr) ...@@ -749,6 +778,7 @@ static struct cxgbi_sock *cxgbi_check_route6(struct sockaddr *dst_addr)
csk->daddr6.sin6_addr = daddr6->sin6_addr; csk->daddr6.sin6_addr = daddr6->sin6_addr;
csk->daddr6.sin6_port = daddr6->sin6_port; csk->daddr6.sin6_port = daddr6->sin6_port;
csk->daddr6.sin6_family = daddr6->sin6_family; csk->daddr6.sin6_family = daddr6->sin6_family;
csk->saddr6.sin6_family = daddr6->sin6_family;
csk->saddr6.sin6_addr = pref_saddr; csk->saddr6.sin6_addr = pref_saddr;
neigh_release(n); neigh_release(n);
...@@ -2647,12 +2677,14 @@ int cxgbi_get_host_param(struct Scsi_Host *shost, enum iscsi_host_param param, ...@@ -2647,12 +2677,14 @@ int cxgbi_get_host_param(struct Scsi_Host *shost, enum iscsi_host_param param,
break; break;
case ISCSI_HOST_PARAM_IPADDRESS: case ISCSI_HOST_PARAM_IPADDRESS:
{ {
__be32 addr; struct cxgbi_sock *csk = find_sock_on_port(chba->cdev,
chba->port_id);
addr = cxgbi_get_iscsi_ipv4(chba); if (csk) {
len = sprintf(buf, "%pI4", &addr); len = sprintf(buf, "%pIS",
(struct sockaddr *)&csk->saddr);
}
log_debug(1 << CXGBI_DBG_ISCSI, log_debug(1 << CXGBI_DBG_ISCSI,
"hba %s, ipv4 %pI4.\n", chba->ndev->name, &addr); "hba %s, addr %s.\n", chba->ndev->name, buf);
break; break;
} }
default: default:
......
...@@ -700,11 +700,6 @@ static inline void cxgbi_set_iscsi_ipv4(struct cxgbi_hba *chba, __be32 ipaddr) ...@@ -700,11 +700,6 @@ static inline void cxgbi_set_iscsi_ipv4(struct cxgbi_hba *chba, __be32 ipaddr)
chba->ndev->name); chba->ndev->name);
} }
static inline __be32 cxgbi_get_iscsi_ipv4(struct cxgbi_hba *chba)
{
return chba->ipv4addr;
}
struct cxgbi_device *cxgbi_device_register(unsigned int, unsigned int); struct cxgbi_device *cxgbi_device_register(unsigned int, unsigned int);
void cxgbi_device_unregister(struct cxgbi_device *); void cxgbi_device_unregister(struct cxgbi_device *);
void cxgbi_device_unregister_all(unsigned int flag); void cxgbi_device_unregister_all(unsigned int flag);
......
...@@ -1893,6 +1893,11 @@ static int scsi_queue_rq(struct blk_mq_hw_ctx *hctx, struct request *req, ...@@ -1893,6 +1893,11 @@ static int scsi_queue_rq(struct blk_mq_hw_ctx *hctx, struct request *req,
blk_mq_start_request(req); blk_mq_start_request(req);
} }
if (blk_queue_tagged(q))
req->cmd_flags |= REQ_QUEUED;
else
req->cmd_flags &= ~REQ_QUEUED;
scsi_init_cmd_errh(cmd); scsi_init_cmd_errh(cmd);
cmd->scsi_done = scsi_mq_done; cmd->scsi_done = scsi_mq_done;
......
...@@ -1136,8 +1136,7 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk) ...@@ -1136,8 +1136,7 @@ static inline bool blk_needs_flush_plug(struct task_struct *tsk)
/* /*
* tag stuff * tag stuff
*/ */
#define blk_rq_tagged(rq) \ #define blk_rq_tagged(rq) ((rq)->cmd_flags & REQ_QUEUED)
((rq)->mq_ctx || ((rq)->cmd_flags & REQ_QUEUED))
extern int blk_queue_start_tag(struct request_queue *, struct request *); extern int blk_queue_start_tag(struct request_queue *, struct request *);
extern struct request *blk_queue_find_tag(struct request_queue *, int); extern struct request *blk_queue_find_tag(struct request_queue *, int);
extern void blk_queue_end_tag(struct request_queue *, struct request *); extern void blk_queue_end_tag(struct request_queue *, struct request *);
......
...@@ -67,8 +67,9 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth) ...@@ -67,8 +67,9 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth)
if (!sdev->tagged_supported) if (!sdev->tagged_supported)
return; return;
if (!shost_use_blk_mq(sdev->host) && if (shost_use_blk_mq(sdev->host))
!blk_queue_tagged(sdev->request_queue)) queue_flag_set_unlocked(QUEUE_FLAG_QUEUED, sdev->request_queue);
else if (!blk_queue_tagged(sdev->request_queue))
blk_queue_init_tags(sdev->request_queue, depth, blk_queue_init_tags(sdev->request_queue, depth,
sdev->host->bqt); sdev->host->bqt);
...@@ -81,8 +82,7 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth) ...@@ -81,8 +82,7 @@ static inline void scsi_activate_tcq(struct scsi_device *sdev, int depth)
**/ **/
static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth) static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
{ {
if (!shost_use_blk_mq(sdev->host) && if (blk_queue_tagged(sdev->request_queue))
blk_queue_tagged(sdev->request_queue))
blk_queue_free_tags(sdev->request_queue); blk_queue_free_tags(sdev->request_queue);
scsi_adjust_queue_depth(sdev, 0, depth); scsi_adjust_queue_depth(sdev, 0, depth);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment