Re: [PATCH v2 27/32] scsi: hisi_sas: add smp protocol support

2015-11-03 Thread Arnd Bergmann
On Tuesday 03 November 2015 11:42:30 John Garry wrote: > > > There seems to be some misunderstanding. Are you suggesting I change > sas_smp_task? > ./include/scsi/libsas.h > struct sas_smp_task { > struct scatterlist smp_req; > struct scatterlist smp_resp; > }; > Ah, no. I had no

Re: [PATCH v2 27/32] scsi: hisi_sas: add smp protocol support

2015-11-03 Thread John Garry
On 02/11/2015 20:29, Arnd Bergmann wrote: On Monday 02 November 2015 17:03:58 John Garry wrote: Can do. Actually sg_req seems only ever has one element: expander.c, smp_execute_task() sg_init_one(&task->smp_task.smp_req, req, req_size); I tried replacing with dma_map_single, but I feel the c

Re: [PATCH v2 27/32] scsi: hisi_sas: add smp protocol support

2015-11-02 Thread Arnd Bergmann
On Monday 02 November 2015 17:03:58 John Garry wrote: > > > > Can do. Actually sg_req seems only ever has one element: > > expander.c, smp_execute_task() > > sg_init_one(&task->smp_task.smp_req, req, req_size); > > > > > I tried replacing with dma_map_single, but I feel the code is not as > clean

Re: [PATCH v2 27/32] scsi: hisi_sas: add smp protocol support

2015-11-02 Thread John Garry
On 30/10/2015 16:22, John Garry wrote: On 30/10/2015 13:53, Arnd Bergmann wrote: On Monday 26 October 2015 22:14:58 John Garry wrote: + /* + * DMA-map SMP request, response buffers + */ + /* req */ + sg_req = &task->smp_task.smp_req; + elem = dma_map_sg(dev,

Re: [PATCH v2 27/32] scsi: hisi_sas: add smp protocol support

2015-10-30 Thread John Garry
On 30/10/2015 13:53, Arnd Bergmann wrote: On Monday 26 October 2015 22:14:58 John Garry wrote: + /* + * DMA-map SMP request, response buffers + */ + /* req */ + sg_req = &task->smp_task.smp_req; + elem = dma_map_sg(dev, sg_req, 1, DMA_TO_DEVICE); + if (

Re: [PATCH v2 27/32] scsi: hisi_sas: add smp protocol support

2015-10-30 Thread Arnd Bergmann
On Monday 26 October 2015 22:14:58 John Garry wrote: > + /* > + * DMA-map SMP request, response buffers > + */ > + /* req */ > + sg_req = &task->smp_task.smp_req; > + elem = dma_map_sg(dev, sg_req, 1, DMA_TO_DEVICE); > + if (!elem) > + return

[PATCH v2 27/32] scsi: hisi_sas: add smp protocol support

2015-10-26 Thread John Garry
Add support for smp function, which allows devices attached by expander to be controlled Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 3 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 10 +++- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 93 ++