net driver fixes
Subsystems (7)
PATCH 1/1 net driver fixes
Note, this includes libertas ioctl removal.
For the record, I do not object to keeping the mesh ioctls, since no one even has a -proposal- for mesh infrastructure, much less code.
But whatever. The current state is not a crime either.
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
to receive the following updates:
MAINTAINERS | 8 +- drivers/net/gianfar.c | 2 +- drivers/net/myri10ge/myri10ge.c | 2 + drivers/net/netxen/netxen_nic.h | 180 +++++- drivers/net/netxen/netxen_nic_hdr.h | 2 + drivers/net/netxen/netxen_nic_hw.c | 33 +- drivers/net/netxen/netxen_nic_init.c | 51 +- drivers/net/netxen/netxen_nic_main.c | 177 +++-- drivers/net/netxen/netxen_nic_phan_reg.h | 14 + drivers/net/ns83820.c | 4 +- drivers/net/pcmcia/3c589_cs.c | 2 +- drivers/net/starfire.c | 2 +- drivers/net/usb/cdc_ether.c | 8 +- drivers/net/usb/dm9601.c | 11 +- drivers/net/usb/usbnet.c | 9 +- drivers/net/wireless/libertas/Makefile | 2 +- drivers/net/wireless/libertas/README | 275 -------- drivers/net/wireless/libertas/assoc.c | 28 +- drivers/net/wireless/libertas/cmd.c | 12 +- drivers/net/wireless/libertas/cmdresp.c | 21 + drivers/net/wireless/libertas/hostcmd.h | 2 +- drivers/net/wireless/libertas/ioctl.c | 1081 ------------------------------ drivers/net/wireless/libertas/main.c | 8 +- drivers/net/wireless/libertas/scan.c | 51 +- drivers/net/wireless/libertas/wext.c | 152 ----- drivers/net/wireless/libertas/wext.h | 45 +-- 26 files changed, 447 insertions(+), 1735 deletions(-) delete mode 100644 drivers/net/wireless/libertas/ioctl.c
Adrian Bunk (1):
drivers/net/ns83820.c: fix a check-after-use
Dan Williams (4):
libertas: style fixes
libertas: kill wlan_scan_process_results
libertas: fix WPA associations by handling ENABLE_RSN correctly
libertas: remove private ioctls
David Brownell (1):
net/usb/cdc_ether minor sparse cleanup
Dhananjay Phadke (1):
RESEND [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon module unload
Kumar Gala (1):
gianfar: Fix typo bug introduced by move to udp_hdr()
Maik Hampel (1):
myri10ge: SET_NETDEV_DEV()
Patrick McHardy (1):
3c589_cs: fix local_bh_enable warning
Peter Korsgaard (4):
dm9601: HW header size shouldn't be included in packet length
usbnet: Zero padding byte if there is tail room in skb Update MAINTAINERS for USB network devices
dm9601: Return 0 from bind() on success
[email protected] (2):
RESEND [PATCH 1/3] NetXen: Fix issue of MSI not working correctly RESEND [PATCH 2/3] NetXen: Support per PCI-function interrupt mask registers
maximilian attems (1):
starfire list alpha as 64 bit arch
MAINTAINERS +4 -4
@@ -3618,7 +3618,7 @@ W: http://www.kroah.com/linux-usb/ USB DAVICOM DM9601 DRIVER P: Peter Korsgaard M: [email protected] -L: [email protected] +L: [email protected] W: http://www.linux-usb.org/usbnet S: Maintained
@@ -3702,8 +3702,8 @@ S: Maintained USB PEGASUS DRIVER P: Petko Manolov M: [email protected] -L: [email protected] L: [email protected] +L: [email protected] W: http://pegasus2.sourceforge.net/ S: Maintained
@@ -3717,8 +3717,8 @@ S: Maintained USB RTL8150 DRIVER P: Petko Manolov M: [email protected] -L: [email protected] L: [email protected] +L: [email protected] W: http://pegasus2.sourceforge.net/ S: Maintained
@@ -3829,7 +3829,7 @@ S: Maintained USB "USBNET" DRIVER FRAMEWORK P: David Brownell M: [email protected] -L: [email protected] +L: [email protected] W: http://www.linux-usb.org/usbnet S: Maintained
drivers/net/gianfar.c +1 -1
@@ -944,7 +944,7 @@ static inline void gfar_tx_checksum(struct sk_buff *skb, struct txfcb *fcb) flags |=TXFCB_UDP ; fcb->phcs =udp_hdr (skb)->check; }else - fcb->phcs =udp_hdr (skb)->check; + fcb->phcs =tcp_hdr (skb)->check;/* l3os is the distance between the start of the * frame (skb->data) and the start of the IP hdr.
drivers/net/myri10ge/myri10ge.c +2 -0
@@ -2854,6 +2854,8 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)return -ENOMEM ; } +SET_NETDEV_DEV (netdev, &pdev->dev); + mgp =netdev_priv (netdev);memset (mgp,0 ,sizeof (*mgp)); mgp->dev = netdev;
drivers/net/netxen/netxen_nic.h +162 -18
225 lines not on this page · raw message
drivers/net/netxen/netxen_nic_hdr.h +2 -0
@@ -687,4 +687,6 @@ enum {#define PCIE_MAX_MASTER_SPLIT (0x14048) +#define NETXEN_CAM_RAM_DMA_WATCHDOG_CTRL (0x14) +#endif /* __NETXEN_NIC_HDR_H_ */
drivers/net/netxen/netxen_nic_hw.c +23 -10
@@ -377,7 +377,7 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) recv_crb_registers[ctx]. crb_rcvpeg_state));while (state !=PHAN_PEG_RCV_INITIALIZED && loops <20 ) { -udelay (100 ); +msleep (1 );/* Window 1 call */ state = readl(NETXEN_CRB_NORMALIZE(adapter, recv_crb_registers
@@ -392,7 +392,11 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter)return err; } } -DPRINTK (INFO ,"Recieve Peg ready too. starting stuff\n" ); + adapter->intr_scheme =readl ( +NETXEN_CRB_NORMALIZE (adapter,CRB_NIC_CAPABILITIES_FW )); +printk (KERN_NOTICE "%s: FW capabilities:0x%x\n" , netxen_nic_driver_name, + adapter->intr_scheme); +DPRINTK (INFO ,"Receive Peg ready too. starting stuff\n" ); addr = netxen_alloc(adapter->ahw.pdev, sizeof(struct netxen_ring_ctx) +
@@ -697,7 +701,7 @@ void netxen_nic_pci_change_crbwindow(struct netxen_adapter *adapter, u32 wndw) adapter->curr_window =0 ; } -void netxen_load_firmware (struct netxen_adapter *adapter) +int netxen_load_firmware (struct netxen_adapter *adapter) {int i;u32 data, size =0 ;
@@ -709,15 +713,24 @@ void netxen_load_firmware(struct netxen_adapter *adapter)writel (1 ,NETXEN_CRB_NORMALIZE (adapter,NETXEN_ROMUSB_GLB_CAS_RST ));for (i =0 ; i < size; i++) { -if (netxen_rom_fast_read (adapter, flashaddr, (int *)&data) !=0 ) { -DPRINTK (ERR , -"Error in netxen_rom_fast_read(). Will skip" -"loading flash image\n" ); -return ; - } +int retries =10 ; +if (netxen_rom_fast_read (adapter, flashaddr, (int *)&data) !=0 ) +return -EIO ; + off =netxen_nic_pci_set_window (adapter, memaddr); addr =pci_base_offset (adapter, off);writel (data, addr); +do { +if (readl (addr) == data) +break ; +msleep (100 ); +writel (data, addr); + }while (--retries); +if (!retries) { +printk (KERN_ERR "%s: firmware load aborted, write failed at 0x%x\n" , + netxen_nic_driver_name, memaddr); +return -EIO ; + } flashaddr +=4 ; memaddr +=4 ; }
@@ -727,7 +740,7 @@ void netxen_load_firmware(struct netxen_adapter *adapter) NETXEN_CRB_NORMALIZE(adapter, NETXEN_ROMUSB_GLB_CHIP_CLK_CTRL));writel (0 ,NETXEN_CRB_NORMALIZE (adapter,NETXEN_ROMUSB_GLB_CAS_RST )); -udelay (100 ); +return 0 ; }int
drivers/net/netxen/netxen_nic_init.c +29 -22
119 lines not on this page · raw message
drivers/net/netxen/netxen_nic_main.c +111 -66
295 lines not on this page · raw message
drivers/net/netxen/netxen_nic_phan_reg.h +14 -0
@@ -114,6 +114,20 @@#define CRB_V2P_3 NETXEN_NIC_REG(0x29c)#define CRB_V2P (port) (CRB_V2P_0+((port)*4))#define CRB_DRIVER_VERSION NETXEN_NIC_REG(0x2a0) +/* sw int status/mask registers */ +#define CRB_SW_INT_MASK_0 NETXEN_NIC_REG(0x1d8) +#define CRB_SW_INT_MASK_1 NETXEN_NIC_REG(0x1e0) +#define CRB_SW_INT_MASK_2 NETXEN_NIC_REG(0x1e4) +#define CRB_SW_INT_MASK_3 NETXEN_NIC_REG(0x1e8) + +/* +* capabilities register, can be used to selectively enable/disable features +* for backward compability +*/ +#define CRB_NIC_CAPABILITIES_HOST NETXEN_NIC_REG(0x1a8) +#define CRB_NIC_CAPABILITIES_FW NETXEN_NIC_REG(0x1dc) + +#define INTR_SCHEME_PERPORT 0x1/* used for ethtool tests */ #define CRB_SCRATCHPAD_TEST NETXEN_NIC_REG(0x280)
drivers/net/ns83820.c +3 -1
@@ -1831,11 +1831,13 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_ ndev =alloc_etherdev (sizeof (struct ns83820 )); dev =PRIV (ndev); - dev->ndev = ndev; + err = -ENOMEM ;if (!dev) goto out; + dev->ndev = ndev; +spin_lock_init (&dev->rx_info.lock);spin_lock_init (&dev->tx_lock);spin_lock_init (&dev->misc_lock);
drivers/net/pcmcia/3c589_cs.c +1 -1
@@ -629,9 +629,9 @@ static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)outw (SetTxThreshold +1536 , ioaddr +EL3_CMD ); } -dev_kfree_skb (skb);pop_tx_status (dev);spin_unlock_irqrestore (&priv->lock, flags); +dev_kfree_skb (skb);return 0 ; }
drivers/net/starfire.c +1 -1
@@ -152,7 +152,7 @@ static int full_duplex[MAX_UNITS] = {0, };* This SUCKS. * We need a much better method to determine if dma_addr_t is 64-bit. */ -#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G )) || defined(__x86_64__) || defined (__ia64__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM ) && defined(CONFIG_64BIT_PHYS_ADDR )) +#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G )) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM ) && defined(CONFIG_64BIT_PHYS_ADDR ))/* 64-bit dma_addr_t */ #define ADDR_64BITS /* This chip uses 64 bit addresses. */ #define netdrv_addr_t u64
drivers/net/usb/cdc_ether.c +4 -4
@@ -144,14 +144,14 @@ int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)* modem interface from an RNDIS non-modem. */ if (rndis) { -struct usb_cdc_acm_descriptor *d; +struct usb_cdc_acm_descriptor *acm; - d = (void *) buf; -if (d->bmCapabilities) { + acm = (void *) buf; +if (acm->bmCapabilities) {dev_dbg (&intf->dev,"ACM capabilities %02x, " "not really RNDIS?\n" , - d->bmCapabilities); + acm->bmCapabilities); goto bad_desc; } }
drivers/net/usb/dm9601.c +5 -6
@@ -414,18 +414,16 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) dev->mii.reg_num_mask =0x1f ;/* reset */ - ret =dm_write_reg (dev,DM_NET_CTRL ,1 ); +dm_write_reg (dev,DM_NET_CTRL ,1 );udelay (20 );/* read MAC */ - ret =dm_read (dev,DM_PHY_ADDR ,ETH_ALEN , dev->net->dev_addr); -if (ret <0 ) { +if (dm_read (dev,DM_PHY_ADDR ,ETH_ALEN , dev->net->dev_addr) <0 ) {printk (KERN_ERR "Error reading MAC address\n" ); ret = -ENODEV ; goto out; } -/* power up phy */ dm_write_reg (dev,DM_GPR_CTRL ,1 );dm_write_reg (dev,DM_GPR_DATA ,0 );
@@ -489,6 +487,8 @@ static struct sk_buff *dm9601_tx_fixup(struct usbnet *dev, struct sk_buff *skb,b3..n: packet data */ + len = skb->len; +if (skb_headroom (skb) <DM_TX_OVERHEAD ) {struct sk_buff *skb2;
@@ -501,10 +501,9 @@ static struct sk_buff *dm9601_tx_fixup(struct usbnet *dev, struct sk_buff *skb,__skb_push (skb,DM_TX_OVERHEAD ); - len = skb->len;/* usbnet adds padding if length is a multiple of packet size if so, adjust length value in header */ -if ((len % dev->maxpacket) ==0 ) +if ((skb->len % dev->maxpacket) ==0 ) len++; skb->data[0 ] = len;
drivers/net/usb/usbnet.c +6 -3
@@ -953,11 +953,14 @@ static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net)/* don't assume the hardware handles USB_ZERO_PACKET * NOTE: strictly conforming cdc-ether devices should expect * the ZLP here, but ignore the one-byte packet. -* -* FIXME zero that byte, if it doesn't require a new skb. */ -if ((length % dev->maxpacket) ==0 ) +if ((length % dev->maxpacket) ==0 ) { urb->transfer_buffer_length++; +if (skb_tailroom (skb)) { + skb->data[skb->len] =0 ; +__skb_put (skb,1 ); + } + }spin_lock_irqsave (&dev->txq.lock, flags);
drivers/net/wireless/libertas/Makefile +1 -1
@@ -2,7 +2,7 @@ libertas-objs := main.o fw.o wext.o \ rx.o tx.o cmd.o \ cmdresp.o scan.o \ join.o 11d.o \ - ioctl.o debugfs.o \ + debugfs.o \ ethtool.o assoc.o usb8xxx-objs += if_bootcmd.o
drivers/net/wireless/libertas/README +0 -275
281 lines not on this page · raw message
drivers/net/wireless/libertas/assoc.c +26 -2
@@ -323,6 +323,8 @@ static int assoc_helper_secinfo(wlan_private *priv, {wlan_adapter *adapter = priv->adapter;int ret =0 ; +u32 do_wpa; +u32 rsn =0 ;lbs_deb_enter (LBS_DEB_ASSOC );
@@ -333,12 +335,34 @@ static int assoc_helper_secinfo(wlan_private *priv,if (ret) goto out; -/* enable/disable RSN */ +/* If RSN is already enabled, don't try to enable it again, since +* ENABLE_RSN resets internal state machines and will clobber the +* 4-way WPA handshake. +*/ + +/* Get RSN enabled/disabled */ ret =libertas_prepare_and_send_command (priv, cmd_802_11_enable_rsn, cmd_act_set, cmd_option_waitforrsp, -0 , assoc_req); +0 , &rsn); +if (ret) { +lbs_deb_assoc ("Failed to get RSN status: %d" , ret); + goto out; + } + +/* Don't re-enable RSN if it's already enabled */ + do_wpa = (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled); +if (do_wpa == rsn) + goto out; + +/* Set RSN enabled/disabled */ + rsn = do_wpa; + ret =libertas_prepare_and_send_command (priv, + cmd_802_11_enable_rsn, + cmd_act_set, + cmd_option_waitforrsp, +0 , &rsn); out:lbs_deb_leave_args (LBS_DEB_ASSOC ,"ret %d" , ret);
drivers/net/wireless/libertas/cmd.c +7 -5
@@ -228,17 +228,19 @@ static int wlan_cmd_802_11_enable_rsn(wlan_private * priv, void * pdata_buf) {struct cmd_ds_802_11_enable_rsn *penableRSN = &cmd->params.enbrsn; -struct assoc_request * assoc_req = pdata_buf; +u32 * enable = pdata_buf;lbs_deb_enter (LBS_DEB_CMD ); cmd->command =cpu_to_le16 (cmd_802_11_enable_rsn); cmd->size =cpu_to_le16 (sizeof (*penableRSN) +S_DS_GEN ); penableRSN->action =cpu_to_le16 (cmd_action); -if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) { - penableRSN->enable =cpu_to_le16 (cmd_enable_rsn); - }else { - penableRSN->enable =cpu_to_le16 (cmd_disable_rsn); + +if (cmd_action == cmd_act_set) { +if (*enable) + penableRSN->enable =cpu_to_le16 (cmd_enable_rsn); +else + penableRSN->enable =cpu_to_le16 (cmd_enable_rsn); }lbs_deb_leave (LBS_DEB_CMD );
drivers/net/wireless/libertas/cmdresp.c +21 -0
@@ -537,6 +537,24 @@ static int wlan_ret_get_log(wlan_private * priv,return 0 ; } +static int libertas_ret_802_11_enable_rsn (wlan_private * priv, +struct cmd_ds_command *resp) +{ +struct cmd_ds_802_11_enable_rsn *enable_rsn = &resp->params.enbrsn; +wlan_adapter *adapter = priv->adapter; +u32 * pdata_buf = adapter->cur_cmd->pdata_buf; + +lbs_deb_enter (LBS_DEB_CMD ); + +if (enable_rsn->action ==cpu_to_le16 (cmd_act_get)) { +if (pdata_buf) + *pdata_buf = (u32 )le16_to_cpu (enable_rsn->enable); + } + +lbs_deb_enter (LBS_DEB_CMD ); +return 0 ; +} +static inline int handle_cmd_response (u16 respcmd,struct cmd_ds_command *resp,wlan_private *priv)
@@ -610,7 +628,10 @@ static inline int handle_cmd_response(u16 respcmd,case cmd_ret_802_11_authenticate:case cmd_ret_802_11_radio_control:case cmd_ret_802_11_beacon_stop: +break ; +case cmd_ret_802_11_enable_rsn: + ret =libertas_ret_802_11_enable_rsn (priv, resp);break ;case cmd_ret_802_11_data_rate:
drivers/net/wireless/libertas/hostcmd.h +1 -1
@@ -503,7 +503,7 @@ struct cmd_ds_802_11_ad_hoc_join {struct cmd_ds_802_11_enable_rsn {__le16 action;__le16 enable; -}; +} __attribute__ ((packed));struct MrvlIEtype_keyParamSet {/* type ID */
drivers/net/wireless/libertas/ioctl.c deleted +0 -1081
1,081 lines not on this page · raw message
drivers/net/wireless/libertas/main.c +4 -4
@@ -181,7 +181,8 @@ u16 libertas_region_code_to_index[MRVDRV_MAX_REGION_CODE] =* @brief Get function for sysfs attribute anycast_mask */ static ssize_t libertas_anycast_get (struct device * dev, -struct device_attribute *attr,char * buf) { +struct device_attribute *attr,char * buf) +{struct cmd_ds_mesh_access mesh_access;memset (&mesh_access,0 ,sizeof (mesh_access));
@@ -197,7 +198,8 @@ static ssize_t libertas_anycast_get(struct device * dev,* @brief Set function for sysfs attribute anycast_mask */ static ssize_t libertas_anycast_set (struct device * dev, -struct device_attribute *attr,const char * buf,size_t count) { +struct device_attribute *attr,const char * buf,size_t count) +{struct cmd_ds_mesh_access mesh_access;uint32_t datum;
@@ -799,7 +801,6 @@ wlan_private *libertas_add_card(void *card, struct device *dmdev) dev->open = wlan_open; dev->hard_start_xmit = wlan_pre_start_xmit; dev->stop = wlan_close; - dev->do_ioctl = libertas_do_ioctl; dev->set_mac_address = wlan_set_mac_address; dev->tx_timeout = wlan_tx_timeout; dev->get_stats = wlan_get_stats;
@@ -918,7 +919,6 @@ int libertas_add_mesh(wlan_private *priv, struct device *dev) mesh_dev->open = mesh_open; mesh_dev->hard_start_xmit = mesh_pre_start_xmit; mesh_dev->stop = mesh_close; - mesh_dev->do_ioctl = libertas_do_ioctl; mesh_dev->get_stats = wlan_get_stats; mesh_dev->set_mac_address = wlan_set_mac_address; mesh_dev->ethtool_ops = &libertas_ethtool_ops;
drivers/net/wireless/libertas/scan.c +14 -37
69 lines not on this page · raw message
drivers/net/wireless/libertas/wext.c +0 -152
170 lines not on this page · raw message
drivers/net/wireless/libertas/wext.h +5 -40
59 lines not on this page · raw message
Quoted 7 lines · Jeff Garzik
...
maximilian attems (1):
starfire list alpha as 64 bit arch
...
drivers/net/starfire.c static int full_duplex[MAX_UNITS] = {0, }; · line 158
Quoted 9 lines
drivers/net/starfire.c +1
-1@@ -152,7 +152,7 @@ static int full_duplex[MAX_UNITS] = {0, };* This SUCKS. * We need a much better method to determine if dma_addr_t is 64-bit. */ -#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G )) || defined(__x86_64__) || defined (__ia64__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM ) && defined(CONFIG_64BIT_PHYS_ADDR )) +#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G )) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM ) && defined(CONFIG_64BIT_PHYS_ADDR ))/* 64-bit dma_addr_t */ #define ADDR_64BITS /* This chip uses 64 bit addresses. */ #define netdrv_addr_t u64
The patch is correct and definitely the best solution at this time of the 2.6.22 development cycle.
But the comment in the context exactly matches what I thought when I saw this code...
Does anyone have a suggestion how to do this better?
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 21 lines · On Tue, 3 Jul 2007 00:13:29 +0200 Adrian Bunk <[email protected]> wrote:
Quoted 7 lines · Jeff Garzik
...
maximilian attems (1):
starfire list alpha as 64 bit arch
...drivers/net/starfire.c static int full_duplex[MAX_UNITS] = {0, }; · line 158
Quoted 9 lines
drivers/net/starfire.c +1
-1@@ -152,7 +152,7 @@ static int full_duplex[MAX_UNITS] = {0, };* This SUCKS. * We need a much better method to determine if dma_addr_t is 64-bit. */ -#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G )) || defined(__x86_64__) || defined (__ia64__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM ) && defined(CONFIG_64BIT_PHYS_ADDR )) +#if (defined(__i386__) && defined(CONFIG_HIGHMEM64G )) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || defined(__mips64__) || (defined(__mips__) && defined(CONFIG_HIGHMEM ) && defined(CONFIG_64BIT_PHYS_ADDR ))/* 64-bit dma_addr_t */ #define ADDR_64BITS /* This chip uses 64 bit addresses. */ #define netdrv_addr_t u64The patch is correct and definitely the best solution at this time of the 2.6.22 development cycle.
Quoted 8 lines
But the comment in the context exactly matches what I thought when I saw this code...
Does anyone have a suggestion how to do this better?
cu
Adrian
Yeah, write code that handles it in compiler. Like:
if (sizeof(dma_addr_t) > sizeof(u32)) {
do something...
}That means that it gets checked even if optimizer removes it as unneeded.
Signature · 1 line
Stephen Hemminger <[email protected]>