Skip to content

Commit

Permalink
Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/gregkh/staging-2.6

* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (26 commits)
  staging: r8712u: Add new device IDs
  staging: brcm80211: fix suspend/resume issue in brcmsmac
  staging: brcm80211: remove assert to avoid panic since 2.6.37 kernel
  Staging: iio: Aditional fixpoint formatted output bugfix
  staging: usbip: vhci: use urb->dev->portnum to find port
  staging: usbip: vhci: handle EAGAIN from SO_RCVTIMEO
  staging: usbip: vhci: friendly log messages for connection errors
  staging: usbip: vhci: refuse to enqueue for dead connections
  staging: usbip: vhci: give back URBs from in-flight unlink requests
  staging: usbip: vhci: update reference count for usb_device
  staging: usbip: stub: update refcounts for devices and interfaces
  staging: tidspbridge: replace mbox callback with notifier_call
  staging: comedi: ni_labpc: Use shared IRQ for PCMCIA card
  Staging: speakup: &&/|| confusion in silent_store()
  iio: Fixpoint formatted output bugfix
  staging: rt2860: Fix incorrect netif_stop_queue usage warning
  staging: r8712u: Fix memory leak in firmware loading
  staging: tidspbridge: configure full L1 MMU range
  staging: rt2870sta: Add ID for Linksys WUSB100v2
  Staging: xgfib: put parenthesis in the right place
  ...
  • Loading branch information
Linus Torvalds committed Jan 31, 2011
2 parents abfa44b + 6b28405 commit fb1c634
Show file tree
Hide file tree
Showing 27 changed files with 294 additions and 134 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ int PSSendOps(void *arg)
status = 1;
goto complete;
}
len = (firmware->size > MAX_BDADDR_FORMAT_LENGTH)? MAX_BDADDR_FORMAT_LENGTH: firmware->size;
memcpy(config_bdaddr, firmware->data,len);
len = min(firmware->size, MAX_BDADDR_FORMAT_LENGTH - 1);
memcpy(config_bdaddr, firmware->data, len);
config_bdaddr[len] = '\0';
write_bdaddr(hdev,config_bdaddr,BDADDR_TYPE_STRING);
A_RELEASE_FIRMWARE(firmware);
Expand Down
45 changes: 23 additions & 22 deletions drivers/staging/brcm80211/sys/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,8 @@ static void wl_ops_stop(struct ieee80211_hw *hw)
struct wl_info *wl = hw->priv;
ASSERT(wl);
WL_LOCK(wl);
wl_down(wl);
ieee80211_stop_queues(hw);
WL_UNLOCK(wl);

return;
}

static int
Expand Down Expand Up @@ -246,7 +243,14 @@ wl_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
static void
wl_ops_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{
return;
struct wl_info *wl;

wl = HW_TO_WL(hw);

/* put driver in down state */
WL_LOCK(wl);
wl_down(wl);
WL_UNLOCK(wl);
}

static int
Expand Down Expand Up @@ -779,7 +783,7 @@ static struct wl_info *wl_attach(u16 vendor, u16 device, unsigned long regs,
wl_found++;
return wl;

fail:
fail:
wl_free(wl);
fail1:
return NULL;
Expand Down Expand Up @@ -1090,7 +1094,6 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return 0;
}

#ifdef LINUXSTA_PS
static int wl_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct wl_info *wl;
Expand All @@ -1105,11 +1108,12 @@ static int wl_suspend(struct pci_dev *pdev, pm_message_t state)
return -ENODEV;
}

/* only need to flag hw is down for proper resume */
WL_LOCK(wl);
wl_down(wl);
wl->pub->hw_up = false;
WL_UNLOCK(wl);
pci_save_state(pdev, wl->pci_psstate);

pci_save_state(pdev);
pci_disable_device(pdev);
return pci_set_power_state(pdev, PCI_D3hot);
}
Expand All @@ -1133,7 +1137,7 @@ static int wl_resume(struct pci_dev *pdev)
if (err)
return err;

pci_restore_state(pdev, wl->pci_psstate);
pci_restore_state(pdev);

err = pci_enable_device(pdev);
if (err)
Expand All @@ -1145,13 +1149,12 @@ static int wl_resume(struct pci_dev *pdev)
if ((val & 0x0000ff00) != 0)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);

WL_LOCK(wl);
err = wl_up(wl);
WL_UNLOCK(wl);

/*
* done. driver will be put in up state
* in wl_ops_add_interface() call.
*/
return err;
}
#endif /* LINUXSTA_PS */

static void wl_remove(struct pci_dev *pdev)
{
Expand Down Expand Up @@ -1184,14 +1187,12 @@ static void wl_remove(struct pci_dev *pdev)
}

static struct pci_driver wl_pci_driver = {
.name = "brcm80211",
.probe = wl_pci_probe,
#ifdef LINUXSTA_PS
.suspend = wl_suspend,
.resume = wl_resume,
#endif /* LINUXSTA_PS */
.remove = __devexit_p(wl_remove),
.id_table = wl_id_table,
.name = "brcm80211",
.probe = wl_pci_probe,
.suspend = wl_suspend,
.resume = wl_resume,
.remove = __devexit_p(wl_remove),
.id_table = wl_id_table,
};

/**
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/sys/wlc_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -5126,7 +5126,6 @@ wlc_sendpkt_mac80211(struct wlc_info *wlc, struct sk_buff *sdu,
fifo = prio2fifo[prio];

ASSERT((uint) skb_headroom(sdu) >= TXOFF);
ASSERT(!(sdu->cloned));
ASSERT(!(sdu->next));
ASSERT(!(sdu->prev));
ASSERT(fifo < NFIFO);
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/comedi/drivers/ni_labpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,8 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
/* grab our IRQ */
if (irq) {
isr_flags = 0;
if (thisboard->bustype == pci_bustype)
if (thisboard->bustype == pci_bustype
|| thisboard->bustype == pcmcia_bustype)
isr_flags |= IRQF_SHARED;
if (request_irq(irq, labpc_interrupt, isr_flags,
driver_labpc.driver_name, dev)) {
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/hv/blkvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ static int blkvsc_probe(struct device *device)
blkdev->gd->first_minor = 0;
blkdev->gd->fops = &block_ops;
blkdev->gd->private_data = blkdev;
blkdev->gd->driverfs_dev = &(blkdev->device_ctx->device);
sprintf(blkdev->gd->disk_name, "hd%c", 'a' + devnum);

blkvsc_do_inquiry(blkdev);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/hv/netvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ static void netvsc_channel_cb(void *context)
/* ASSERT(device); */

packet = kzalloc(NETVSC_PACKET_SIZE * sizeof(unsigned char),
GFP_KERNEL);
GFP_ATOMIC);
if (!packet)
return;
buffer = packet;
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/hv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ static int netvsc_probe(struct device *device)

/* Set initial state */
netif_carrier_off(net);
netif_stop_queue(net);

net_device_ctx = netdev_priv(net);
net_device_ctx->device_ctx = device_ctx;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/adc/ad7476_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static ssize_t ad7476_show_scale(struct device *dev,
/* Corresponds to Vref / 2^(bits) */
unsigned int scale_uv = (st->int_vref_mv * 1000) >> st->chip_info->bits;

return sprintf(buf, "%d.%d\n", scale_uv / 1000, scale_uv % 1000);
return sprintf(buf, "%d.%03d\n", scale_uv / 1000, scale_uv % 1000);
}
static IIO_DEVICE_ATTR(in_scale, S_IRUGO, ad7476_show_scale, NULL, 0);

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/adc/ad7887_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static ssize_t ad7887_show_scale(struct device *dev,
/* Corresponds to Vref / 2^(bits) */
unsigned int scale_uv = (st->int_vref_mv * 1000) >> st->chip_info->bits;

return sprintf(buf, "%d.%d\n", scale_uv / 1000, scale_uv % 1000);
return sprintf(buf, "%d.%03d\n", scale_uv / 1000, scale_uv % 1000);
}
static IIO_DEVICE_ATTR(in_scale, S_IRUGO, ad7887_show_scale, NULL, 0);

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/adc/ad799x_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ static ssize_t ad799x_show_scale(struct device *dev,
/* Corresponds to Vref / 2^(bits) */
unsigned int scale_uv = (st->int_vref_mv * 1000) >> st->chip_info->bits;

return sprintf(buf, "%d.%d\n", scale_uv / 1000, scale_uv % 1000);
return sprintf(buf, "%d.%03d\n", scale_uv / 1000, scale_uv % 1000);
}

static IIO_DEVICE_ATTR(in_scale, S_IRUGO, ad799x_show_scale, NULL, 0);
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/dac/ad5446.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static ssize_t ad5446_show_scale(struct device *dev,
/* Corresponds to Vref / 2^(bits) */
unsigned int scale_uv = (st->vref_mv * 1000) >> st->chip_info->bits;

return sprintf(buf, "%d.%d\n", scale_uv / 1000, scale_uv % 1000);
return sprintf(buf, "%d.%03d\n", scale_uv / 1000, scale_uv % 1000);
}
static IIO_DEVICE_ATTR(out_scale, S_IRUGO, ad5446_show_scale, NULL, 0);

Expand Down
2 changes: 0 additions & 2 deletions drivers/staging/rt2860/rt_main_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,6 @@ struct net_device *RtmpPhyNetDevInit(struct rt_rtmp_adapter *pAd,
net_dev->ml_priv = (void *)pAd;
pAd->net_dev = net_dev;

netif_stop_queue(net_dev);

return net_dev;

}
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/rt2860/usb_main_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ struct usb_device_id rtusb_usb_id[] = {
{USB_DEVICE(0x0411, 0x016f)}, /* MelCo.,Inc. WLI-UC-G301N */
{USB_DEVICE(0x1737, 0x0070)}, /* Linksys WUSB100 */
{USB_DEVICE(0x1737, 0x0071)}, /* Linksys WUSB600N */
{USB_DEVICE(0x1737, 0x0078)}, /* Linksys WUSB100v2 */
{USB_DEVICE(0x0411, 0x00e8)}, /* Buffalo WLI-UC-G300N */
{USB_DEVICE(0x050d, 0x815c)}, /* Belkin F5D8053 */
{USB_DEVICE(0x100D, 0x9031)}, /* Motorola 2770 */
Expand Down
11 changes: 7 additions & 4 deletions drivers/staging/rtl8712/hal_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,21 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
u8 *ptmpchar = NULL, *ppayload, *ptr;
struct tx_desc *ptx_desc;
u32 txdscp_sz = sizeof(struct tx_desc);
u8 ret = _FAIL;

ulfilelength = rtl871x_open_fw(padapter, &phfwfile_hdl, &pmappedfw);
if (pmappedfw && (ulfilelength > 0)) {
update_fwhdr(&fwhdr, pmappedfw);
if (chk_fwhdr(&fwhdr, ulfilelength) == _FAIL)
goto exit_fail;
goto firmware_rel;
fill_fwpriv(padapter, &fwhdr.fwpriv);
/* firmware check ok */
maxlen = (fwhdr.img_IMEM_size > fwhdr.img_SRAM_size) ?
fwhdr.img_IMEM_size : fwhdr.img_SRAM_size;
maxlen += txdscp_sz;
ptmpchar = _malloc(maxlen + FWBUFF_ALIGN_SZ);
if (ptmpchar == NULL)
return _FAIL;
goto firmware_rel;

ptx_desc = (struct tx_desc *)(ptmpchar + FWBUFF_ALIGN_SZ -
((addr_t)(ptmpchar) & (FWBUFF_ALIGN_SZ - 1)));
Expand Down Expand Up @@ -273,11 +274,13 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
goto exit_fail;
} else
goto exit_fail;
return _SUCCESS;
ret = _SUCCESS;

exit_fail:
kfree(ptmpchar);
return _FAIL;
firmware_rel:
release_firmware((struct firmware *)phfwfile_hdl);
return ret;
}

uint rtl8712_hal_init(struct _adapter *padapter)
Expand Down
Loading

0 comments on commit fb1c634

Please sign in to comment.