Third 5.0 rc pull request
Three smallish patches fixing regressions in v5.0: - Fix cxgb4 to work again with non-4k page sizes - NULL pointer oops in SRP during sg_reset -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfB7FMLh+8QxL+6i3OG33FX4gmxoFAlxvKuwACgkQOG33FX4g mxrNExAAiiCqJlQ9ZaEnYKQZydRn+JZjkjfoxTumqhNhTRFXgj/1tgLuVf2xNM6N iNroyZS8zvZMZvGlrhTRZIBBXQizhkUUCwnLV1BIJw4b8VBIyWgF6iQUCBLcM9E6 wG18U3ySGzIUccBcD6fn+yHd1xMST7wEtU5cgqeGFLpGfT4rwS6n1vQia0gokG/i 94qhifxvz4MIt66v95JnFaXM4n/funVL36DHGiDMglqmpE7aujUyMuL4qDQfsRue HDoxeH8b3eMxkmZ3UQPVZhwbF4SqQw6Zjb7vFepHU4dFtbZgUZMZKNTNYKD9oI3d P5KGCtOg0PiDKqT+DAYda+7BrykBYHTQZwuUzAoh5Vyv19UiwaPQn34Ub7EX+VvX yhJcWnh8eDNkjVd0tNMZn9LxYjm48WyTOg4qUWIIo512HfsMua5jCuWMA1xRNZ1u kh9rY1oaTdtWPA8n1HbK0w6L3d6e6oiXZXlVdLUSnGXEyo8vEoGKckUOXxb1e0Up h8wAyisbZ2oQi8+d1hfyQ8EFOLzibjHmbR0IhM72/rhrIAEIC2Aj/F0ej3gwi49B Vv324j3LbdSNnCzeQnVeU/PfQkuc8haFNnyNgakN4srNmZKAfT/o6aoGWrUaLwdF aYvmYhsBUBGdxUld9qYItjpEudew6g1LaBJ71D5NplUvcz9S5iU= =JFU9 -----END PGP SIGNATURE----- Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Small set of three regression fixing patches, things are looking pretty good here. - Fix cxgb4 to work again with non-4k page sizes - NULL pointer oops in SRP during sg_reset" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: iw_cxgb4: cq/qp mask depends on bar2 pages in a host page cxgb4: Export sge_host_page_size to ulds RDMA/srp: Rework SCSI device reset handling
This commit is contained in:
commit
168bd29830
|
@ -783,6 +783,7 @@ void c4iw_init_dev_ucontext(struct c4iw_rdev *rdev,
|
||||||
static int c4iw_rdev_open(struct c4iw_rdev *rdev)
|
static int c4iw_rdev_open(struct c4iw_rdev *rdev)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
unsigned int factor;
|
||||||
|
|
||||||
c4iw_init_dev_ucontext(rdev, &rdev->uctx);
|
c4iw_init_dev_ucontext(rdev, &rdev->uctx);
|
||||||
|
|
||||||
|
@ -806,8 +807,18 @@ static int c4iw_rdev_open(struct c4iw_rdev *rdev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
rdev->qpmask = rdev->lldi.udb_density - 1;
|
/* This implementation requires a sge_host_page_size <= PAGE_SIZE. */
|
||||||
rdev->cqmask = rdev->lldi.ucq_density - 1;
|
if (rdev->lldi.sge_host_page_size > PAGE_SIZE) {
|
||||||
|
pr_err("%s: unsupported sge host page size %u\n",
|
||||||
|
pci_name(rdev->lldi.pdev),
|
||||||
|
rdev->lldi.sge_host_page_size);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
factor = PAGE_SIZE / rdev->lldi.sge_host_page_size;
|
||||||
|
rdev->qpmask = (rdev->lldi.udb_density * factor) - 1;
|
||||||
|
rdev->cqmask = (rdev->lldi.ucq_density * factor) - 1;
|
||||||
|
|
||||||
pr_debug("dev %s stag start 0x%0x size 0x%0x num stags %d pbl start 0x%0x size 0x%0x rq start 0x%0x size 0x%0x qp qid start %u size %u cq qid start %u size %u srq size %u\n",
|
pr_debug("dev %s stag start 0x%0x size 0x%0x num stags %d pbl start 0x%0x size 0x%0x rq start 0x%0x size 0x%0x qp qid start %u size %u cq qid start %u size %u srq size %u\n",
|
||||||
pci_name(rdev->lldi.pdev), rdev->lldi.vr->stag.start,
|
pci_name(rdev->lldi.pdev), rdev->lldi.vr->stag.start,
|
||||||
rdev->lldi.vr->stag.size, c4iw_num_stags(rdev),
|
rdev->lldi.vr->stag.size, c4iw_num_stags(rdev),
|
||||||
|
|
|
@ -3032,7 +3032,6 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)
|
||||||
{
|
{
|
||||||
struct srp_target_port *target = host_to_target(scmnd->device->host);
|
struct srp_target_port *target = host_to_target(scmnd->device->host);
|
||||||
struct srp_rdma_ch *ch;
|
struct srp_rdma_ch *ch;
|
||||||
int i, j;
|
|
||||||
u8 status;
|
u8 status;
|
||||||
|
|
||||||
shost_printk(KERN_ERR, target->scsi_host, "SRP reset_device called\n");
|
shost_printk(KERN_ERR, target->scsi_host, "SRP reset_device called\n");
|
||||||
|
@ -3044,15 +3043,6 @@ static int srp_reset_device(struct scsi_cmnd *scmnd)
|
||||||
if (status)
|
if (status)
|
||||||
return FAILED;
|
return FAILED;
|
||||||
|
|
||||||
for (i = 0; i < target->ch_count; i++) {
|
|
||||||
ch = &target->ch[i];
|
|
||||||
for (j = 0; j < target->req_ring_size; ++j) {
|
|
||||||
struct srp_request *req = &ch->req_ring[j];
|
|
||||||
|
|
||||||
srp_finish_req(ch, req, scmnd->device, DID_RESET << 16);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -660,6 +660,7 @@ static void uld_init(struct adapter *adap, struct cxgb4_lld_info *lld)
|
||||||
lld->cclk_ps = 1000000000 / adap->params.vpd.cclk;
|
lld->cclk_ps = 1000000000 / adap->params.vpd.cclk;
|
||||||
lld->udb_density = 1 << adap->params.sge.eq_qpp;
|
lld->udb_density = 1 << adap->params.sge.eq_qpp;
|
||||||
lld->ucq_density = 1 << adap->params.sge.iq_qpp;
|
lld->ucq_density = 1 << adap->params.sge.iq_qpp;
|
||||||
|
lld->sge_host_page_size = 1 << (adap->params.sge.hps + 10);
|
||||||
lld->filt_mode = adap->params.tp.vlan_pri_map;
|
lld->filt_mode = adap->params.tp.vlan_pri_map;
|
||||||
/* MODQ_REQ_MAP sets queues 0-3 to chan 0-3 */
|
/* MODQ_REQ_MAP sets queues 0-3 to chan 0-3 */
|
||||||
for (i = 0; i < NCHAN; i++)
|
for (i = 0; i < NCHAN; i++)
|
||||||
|
|
|
@ -336,6 +336,7 @@ struct cxgb4_lld_info {
|
||||||
unsigned int cclk_ps; /* Core clock period in psec */
|
unsigned int cclk_ps; /* Core clock period in psec */
|
||||||
unsigned short udb_density; /* # of user DB/page */
|
unsigned short udb_density; /* # of user DB/page */
|
||||||
unsigned short ucq_density; /* # of user CQs/page */
|
unsigned short ucq_density; /* # of user CQs/page */
|
||||||
|
unsigned int sge_host_page_size; /* SGE host page size */
|
||||||
unsigned short filt_mode; /* filter optional components */
|
unsigned short filt_mode; /* filter optional components */
|
||||||
unsigned short tx_modq[NCHAN]; /* maps each tx channel to a */
|
unsigned short tx_modq[NCHAN]; /* maps each tx channel to a */
|
||||||
/* scheduler queue */
|
/* scheduler queue */
|
||||||
|
|
Loading…
Reference in New Issue