Re: [PATCH v2 1/7] usb/isp1760: Move to native-endian ptds

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 25, 2011 at 12:17:30AM +0100, Arvid Brodin wrote:
> This helps users with platform-bus-connected isp176xs with endianness problems
> and fixes a bug with non-32-bit io transfers on big endian hardware with
> straight data bus, where payload has to be byteswapped instead of ptds.
> 
> Signed-off-by: Arvid Brodin <arvid.brodin@xxxxxxxx>
> ---
>  drivers/usb/host/isp1760-hcd.c |  625 +++++++++++++++++++---------------------
>  drivers/usb/host/isp1760-hcd.h |   33 +--
>  2 files changed, 315 insertions(+), 343 deletions(-)
> 
> diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
> index c470cc8..428a255 100644
> --- a/drivers/usb/host/isp1760-hcd.c
> +++ b/drivers/usb/host/isp1760-hcd.c
> @@ -114,73 +114,136 @@ struct isp1760_qh {
>  
>  #define ehci_port_speed(priv, portsc) USB_PORT_STAT_HIGH_SPEED
>  
> -static unsigned int isp1760_readl(__u32 __iomem *regs)
> +static u32 isp176x_reg_read32(void __iomem *base, u32 reg)
>  {
> -	return readl(regs);
> +	BUG_ON(reg >= 0x0400);

Adding BUG() calls to drivers is not ok.  You do NOT want to just freeze
a machine like this, that's unacceptable.

Please redo this series and do not add any new calls that will crash a
box.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux