Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-16 Thread John Garry
On 16/01/2019 02:54, Martin K. Petersen wrote: Hi John, Hi Martin, So in this case I think that accessor functions are actually better because they allow us to print a big fat warning when you twiddle something you shouldn't post-initialization. So that's something I think we could--and

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-15 Thread Martin K. Petersen
Hi John, >> So in this case I think that accessor functions are actually better >> because they allow us to print a big fat warning when you twiddle >> something you shouldn't post-initialization. So that's something I think >> we could--and should--improve. >> > Sure, this is an alternative,

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-14 Thread John Garry
On 12/01/2019 02:34, Martin K. Petersen wrote: John, So how about just drop these APIs and let the user set the shost protection parameters directly, like other shost parameters, The protection interfaces here obviously predate the block layer allocation changes that made this particular

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-11 Thread Martin K. Petersen
John, > So how about just drop these APIs and let the user set the shost > protection parameters directly, like other shost parameters, The protection interfaces here obviously predate the block layer allocation changes that made this particular issue pop up. > which should make it a bit

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-10 Thread John Garry
On 09/01/2019 18:41, Christoph Hellwig wrote: This looks good. I wonder if there is any good way to prevent other drivers from picking up this bug byt using a better interface, but that should not delay your fix. . I noticed that hisi_sas has this same problem but I forgot to fix it. So

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-09 Thread Christoph Hellwig
This looks good. I wonder if there is any good way to prevent other drivers from picking up this bug byt using a better interface, but that should not delay your fix.

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-08 Thread Martin K. Petersen
Logan, > To prevent this, the calls to scsi_host_set_prot() are moved into > isci_host_alloc() before the call to scsi_add_host(). Out of caution, > also move the similar call to scsi_host_set_guard(). Applied to 5.0/scsi-fixes. Thanks much! -- Martin K. Petersen Oracle Linux

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-08 Thread Jens Axboe
On 1/8/19 1:50 PM, Logan Gunthorpe wrote: > scsi_mq_setup_tags(), which is called by scsi_add_host(), calculates > the command size to allocate based on the prot_capabilities. In the > isci driver, scsi_host_set_prot() is called after scsi_add_host() > so the command size gets calculated to be

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-08 Thread Jeff Moyer
Logan Gunthorpe writes: > scsi_mq_setup_tags(), which is called by scsi_add_host(), calculates > the command size to allocate based on the prot_capabilities. In the > isci driver, scsi_host_set_prot() is called after scsi_add_host() > so the command size gets calculated to be smaller than it