* Re: [S] Re: [linux-uwb] packet size problem [not found] <00b401c8cbc1$ebd48800$5108a8c0@alcormicro.com> @ 2008-06-11 14:39 ` Alan Stern 2008-06-11 14:53 ` Jens Axboe 0 siblings, 1 reply; 4+ messages in thread From: Alan Stern @ 2008-06-11 14:39 UTC (permalink / raw) To: AntonioLin, Jens Axboe; +Cc: David Vrabel, USB list, Kernel development list On Wed, 11 Jun 2008, AntonioLin wrote: > Hi All, > > I checked srb->device->request_queue->dma_alignment in usb_stor_bulk_Bulk_transport() routine. , the value is 1023. > > But in usb_stor_bulk_transfer_sglist, the length of first element in sg array is 3584 which is not divisible by 1024. > > > Can you post your /proc/bus/usb/devices ? > > I don't know how to do this, could you descript moe about it ? > (Sorry,I have few experience about Linux.) All you have to do is: cat /proc/bus/usb/devices Or even just tell your email client to include /proc/bus/usb/devices as an attachment. However some Linux distributions don't automatically mount /proc/bus/usb. If yours doesn't, you will have to do (as root): mount -t usbfs none /proc/bus/usb before you can access /proc/bus/usb/devices. But in any case it doesn't matter, since you have checked that the value of dma_alignment really is 1023. Jens, this is a question for you. How come we're getting an SG element whose lenth is 3584 when the request_queue's dma_alignment mask is set to 1023? Is dma_alignment not the right parameter to set? Alan Stern ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [S] Re: [linux-uwb] packet size problem 2008-06-11 14:39 ` [S] Re: [linux-uwb] packet size problem Alan Stern @ 2008-06-11 14:53 ` Jens Axboe 2008-06-11 15:16 ` Alan Stern 2008-06-12 21:14 ` Alan Stern 0 siblings, 2 replies; 4+ messages in thread From: Jens Axboe @ 2008-06-11 14:53 UTC (permalink / raw) To: Alan Stern; +Cc: AntonioLin, David Vrabel, USB list, Kernel development list On Wed, Jun 11 2008, Alan Stern wrote: > On Wed, 11 Jun 2008, AntonioLin wrote: > > > Hi All, > > > > I checked srb->device->request_queue->dma_alignment in usb_stor_bulk_Bulk_transport() routine. , the value is 1023. > > > > But in usb_stor_bulk_transfer_sglist, the length of first element in sg array is 3584 which is not divisible by 1024. > > > > > > Can you post your /proc/bus/usb/devices ? > > > > I don't know how to do this, could you descript moe about it ? > > (Sorry,I have few experience about Linux.) > > All you have to do is: > > cat /proc/bus/usb/devices > > Or even just tell your email client to include /proc/bus/usb/devices as > an attachment. However some Linux distributions don't automatically > mount /proc/bus/usb. If yours doesn't, you will have to do (as root): > > mount -t usbfs none /proc/bus/usb > > before you can access /proc/bus/usb/devices. But in any case it > doesn't matter, since you have checked that the value of dma_alignment > really is 1023. > > Jens, this is a question for you. How come we're getting an SG element > whose lenth is 3584 when the request_queue's dma_alignment mask is set > to 1023? Is dma_alignment not the right parameter to set? dma_alignment mask is the buffer address alignment, so they are not completely the same. But it does sound odd, since you would then be spanning two pages for that sg element. Is this before or after dma mapping the sg table? -- Jens Axboe ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [S] Re: [linux-uwb] packet size problem 2008-06-11 14:53 ` Jens Axboe @ 2008-06-11 15:16 ` Alan Stern 2008-06-12 21:14 ` Alan Stern 1 sibling, 0 replies; 4+ messages in thread From: Alan Stern @ 2008-06-11 15:16 UTC (permalink / raw) To: Jens Axboe; +Cc: AntonioLin, David Vrabel, USB list, Kernel development list On Wed, 11 Jun 2008, Jens Axboe wrote: > > Jens, this is a question for you. How come we're getting an SG element > > whose lenth is 3584 when the request_queue's dma_alignment mask is set > > to 1023? Is dma_alignment not the right parameter to set? > > dma_alignment mask is the buffer address alignment, so they are not > completely the same. Well then, put it this way: We don't care particularly about the address alignment as such, but we do need the buffer length to be a multiple of 1024 for all but the last element in the SG list. Is there a better way to accomplish this? > But it does sound odd, since you would then be > spanning two pages for that sg element. Is this before or after dma > mapping the sg table? Both. Alan Stern ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [S] Re: [linux-uwb] packet size problem 2008-06-11 14:53 ` Jens Axboe 2008-06-11 15:16 ` Alan Stern @ 2008-06-12 21:14 ` Alan Stern 1 sibling, 0 replies; 4+ messages in thread From: Alan Stern @ 2008-06-12 21:14 UTC (permalink / raw) To: Jens Axboe; +Cc: AntonioLin, David Vrabel, USB list, Kernel development list On Wed, 11 Jun 2008, Jens Axboe wrote: > > Jens, this is a question for you. How come we're getting an SG element > > whose lenth is 3584 when the request_queue's dma_alignment mask is set > > to 1023? Is dma_alignment not the right parameter to set? > > dma_alignment mask is the buffer address alignment, so they are not > completely the same. But it does sound odd, since you would then be > spanning two pages for that sg element. Is this before or after dma > mapping the sg table? Any followup on this? Is there a different way to request that each SG element (except the last) has length divisible by 1024, other than setting the dma_alignment mask to 1023? Alan Stern ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-12 21:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <00b401c8cbc1$ebd48800$5108a8c0@alcormicro.com>
2008-06-11 14:39 ` [S] Re: [linux-uwb] packet size problem Alan Stern
2008-06-11 14:53 ` Jens Axboe
2008-06-11 15:16 ` Alan Stern
2008-06-12 21:14 ` Alan Stern
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.