Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45803
b: refs/heads/master
c: 48c35b2
h: refs/heads/master
i:
  45801: 342b11e
  45799: e657cc4
v: v3
  • Loading branch information
Alexey Dobriyan authored and Ralf Baechle committed Jan 24, 2007
1 parent fc8aaf4 commit 9defeb6
Show file tree
Hide file tree
Showing 44 changed files with 229 additions and 231 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 717d44e849219781ced028a40fcc59d3e1f49e4c
refs/heads/master: 48c35b2d245fffedadce62769aafea8ecf493d19
2 changes: 1 addition & 1 deletion trunk/arch/mips/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ LDFLAGS += -m $(ld-emul)

ifdef CONFIG_MIPS
CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \
egrep -vw '__GNUC_(MAJOR|MINOR|PATCHLEVEL)__' | \
egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \
sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
ifdef CONFIG_64BIT
CHECKFLAGS += -m64
Expand Down
39 changes: 28 additions & 11 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x27c1), board_ahci }, /* ICH7 */
{ PCI_VDEVICE(INTEL, 0x27c5), board_ahci }, /* ICH7M */
{ PCI_VDEVICE(INTEL, 0x27c3), board_ahci }, /* ICH7R */
{ PCI_VDEVICE(AL, 0x5288), board_ahci_ign_iferr }, /* ULi M5288 */
{ PCI_VDEVICE(AL, 0x5288), board_ahci }, /* ULi M5288 */
{ PCI_VDEVICE(INTEL, 0x2681), board_ahci }, /* ESB2 */
{ PCI_VDEVICE(INTEL, 0x2682), board_ahci }, /* ESB2 */
{ PCI_VDEVICE(INTEL, 0x2683), board_ahci }, /* ESB2 */
Expand Down Expand Up @@ -586,18 +586,35 @@ static void ahci_power_down(void __iomem *port_mmio, u32 cap)
{
u32 cmd, scontrol;

if (!(cap & HOST_CAP_SSS))
return;
cmd = readl(port_mmio + PORT_CMD) & ~PORT_CMD_ICC_MASK;

if (cap & HOST_CAP_SSC) {
/* enable transitions to slumber mode */
scontrol = readl(port_mmio + PORT_SCR_CTL);
if ((scontrol & 0x0f00) > 0x100) {
scontrol &= ~0xf00;
writel(scontrol, port_mmio + PORT_SCR_CTL);
}

/* put device into listen mode, first set PxSCTL.DET to 0 */
scontrol = readl(port_mmio + PORT_SCR_CTL);
scontrol &= ~0xf;
writel(scontrol, port_mmio + PORT_SCR_CTL);
/* put device into slumber mode */
writel(cmd | PORT_CMD_ICC_SLUMBER, port_mmio + PORT_CMD);

/* then set PxCMD.SUD to 0 */
cmd = readl(port_mmio + PORT_CMD) & ~PORT_CMD_ICC_MASK;
cmd &= ~PORT_CMD_SPIN_UP;
writel(cmd, port_mmio + PORT_CMD);
/* wait for the transition to complete */
ata_wait_register(port_mmio + PORT_CMD, PORT_CMD_ICC_SLUMBER,
PORT_CMD_ICC_SLUMBER, 1, 50);
}

/* put device into listen mode */
if (cap & HOST_CAP_SSS) {
/* first set PxSCTL.DET to 0 */
scontrol = readl(port_mmio + PORT_SCR_CTL);
scontrol &= ~0xf;
writel(scontrol, port_mmio + PORT_SCR_CTL);

/* then set PxCMD.SUD to 0 */
cmd &= ~PORT_CMD_SPIN_UP;
writel(cmd, port_mmio + PORT_CMD);
}
}

static void ahci_init_port(void __iomem *port_mmio, u32 cap,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev,
if (cmd->use_sg) {
qc->__sg = (struct scatterlist *) cmd->request_buffer;
qc->n_elem = cmd->use_sg;
} else if (cmd->request_bufflen) {
} else {
qc->__sg = &qc->sgent;
qc->n_elem = 1;
}
Expand Down
14 changes: 8 additions & 6 deletions trunk/drivers/ata/sata_nv.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ static void nv_adma_check_cpb(struct ata_port *ap, int cpb_num, int force_err)
static int nv_host_intr(struct ata_port *ap, u8 irq_stat)
{
struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag);
int handled;

/* freeze if hotplugged */
if (unlikely(irq_stat & (NV_INT_ADDED | NV_INT_REMOVED))) {
Expand All @@ -718,7 +719,13 @@ static int nv_host_intr(struct ata_port *ap, u8 irq_stat)
}

/* handle interrupt */
return ata_host_intr(ap, qc);
handled = ata_host_intr(ap, qc);
if (unlikely(!handled)) {
/* spurious, clear it */
ata_check_status(ap);
}

return 1;
}

static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
Expand All @@ -745,11 +752,6 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance)
if (pp->flags & NV_ADMA_PORT_REGISTER_MODE) {
u8 irq_stat = readb(host->mmio_base + NV_INT_STATUS_CK804)
>> (NV_INT_PORT_SHIFT * i);
if(ata_tag_valid(ap->active_tag))
/** NV_INT_DEV indication seems unreliable at times
at least in ADMA mode. Force it on always when a
command is active, to prevent losing interrupts. */
irq_stat |= NV_INT_DEV;
handled += nv_host_intr(ap, irq_stat);
continue;
}
Expand Down
45 changes: 25 additions & 20 deletions trunk/drivers/net/irda/irda-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,25 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
goto drop;
}

memcpy(self->tx_buff + self->header_length, skb->data, skb->len);
/* Make sure there is room for IrDA-USB header. The actual
* allocation will be done lower in skb_push().
* Also, we don't use directly skb_cow(), because it require
* headroom >= 16, which force unnecessary copies - Jean II */
if (skb_headroom(skb) < self->header_length) {
IRDA_DEBUG(0, "%s(), Insuficient skb headroom.\n", __FUNCTION__);
if (skb_cow(skb, self->header_length)) {
IRDA_WARNING("%s(), failed skb_cow() !!!\n", __FUNCTION__);
goto drop;
}
}

/* Change setting for next frame */

if (self->capability & IUC_STIR421X) {
__u8 turnaround_time;
__u8* frame = self->tx_buff;
__u8* frame;
turnaround_time = get_turnaround_time( skb );
frame= skb_push(skb, self->header_length);
irda_usb_build_header(self, frame, 0);
frame[2] = turnaround_time;
if ((skb->len != 0) &&
Expand All @@ -460,17 +472,17 @@ static int irda_usb_hard_xmit(struct sk_buff *skb, struct net_device *netdev)
frame[1] = 0;
}
} else {
irda_usb_build_header(self, self->tx_buff, 0);
irda_usb_build_header(self, skb_push(skb, self->header_length), 0);
}

/* FIXME: Make macro out of this one */
((struct irda_skb_cb *)skb->cb)->context = self;

usb_fill_bulk_urb(urb, self->usbdev,
usb_fill_bulk_urb(urb, self->usbdev,
usb_sndbulkpipe(self->usbdev, self->bulk_out_ep),
self->tx_buff, skb->len + self->header_length,
skb->data, IRDA_SKB_MAX_MTU,
write_bulk_callback, skb);

urb->transfer_buffer_length = skb->len;
/* This flag (URB_ZERO_PACKET) indicates that what we send is not
* a continuous stream of data but separate packets.
* In this case, the USB layer will insert an empty USB frame (TD)
Expand Down Expand Up @@ -1443,9 +1455,6 @@ static inline void irda_usb_close(struct irda_usb_cb *self)
/* Remove the speed buffer */
kfree(self->speed_buff);
self->speed_buff = NULL;

kfree(self->tx_buff);
self->tx_buff = NULL;
}

/********************** USB CONFIG SUBROUTINES **********************/
Expand Down Expand Up @@ -1515,6 +1524,8 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_

IRDA_DEBUG(0, "%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n",
__FUNCTION__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep);
/* Should be 8, 16, 32 or 64 bytes */
IRDA_ASSERT(self->bulk_out_mtu == 64, ;);

return((self->bulk_in_ep != 0) && (self->bulk_out_ep != 0));
}
Expand Down Expand Up @@ -1742,14 +1753,9 @@ static int irda_usb_probe(struct usb_interface *intf,

memset(self->speed_buff, 0, IRDA_USB_SPEED_MTU);

self->tx_buff = kzalloc(IRDA_SKB_MAX_MTU + self->header_length,
GFP_KERNEL);
if (self->tx_buff == NULL)
goto err_out_4;

ret = irda_usb_open(self);
if (ret)
goto err_out_5;
goto err_out_4;

IRDA_MESSAGE("IrDA: Registered device %s\n", net->name);
usb_set_intfdata(intf, self);
Expand All @@ -1760,14 +1766,14 @@ static int irda_usb_probe(struct usb_interface *intf,
self->needspatch = (ret < 0);
if (self->needspatch) {
IRDA_ERROR("STIR421X: Couldn't upload patch\n");
goto err_out_6;
goto err_out_5;
}

/* replace IrDA class descriptor with what patched device is now reporting */
irda_desc = irda_usb_find_class_desc (self->usbintf);
if (irda_desc == NULL) {
ret = -ENODEV;
goto err_out_6;
goto err_out_5;
}
if (self->irda_desc)
kfree (self->irda_desc);
Expand All @@ -1776,10 +1782,9 @@ static int irda_usb_probe(struct usb_interface *intf,
}

return 0;
err_out_6:
unregister_netdev(self->netdev);

err_out_5:
kfree(self->tx_buff);
unregister_netdev(self->netdev);
err_out_4:
kfree(self->speed_buff);
err_out_3:
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/irda/irda-usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ struct irda_usb_cb {
struct irlap_cb *irlap; /* The link layer we are binded to */
struct qos_info qos;
char *speed_buff; /* Buffer for speed changes */
char *tx_buff;

struct timeval stamp;
struct timeval now;
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/net/irda/vlsi_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static void vlsi_proc_pdev(struct seq_file *seq, struct pci_dev *pdev)
unsigned i;

seq_printf(seq, "\n%s (vid/did: %04x/%04x)\n",
pci_name(pdev), (int)pdev->vendor, (int)pdev->device);
PCIDEV_NAME(pdev), (int)pdev->vendor, (int)pdev->device);
seq_printf(seq, "pci-power-state: %u\n", (unsigned) pdev->current_state);
seq_printf(seq, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n",
pdev->irq, (unsigned)pci_resource_start(pdev, 0), (unsigned long long)pdev->dma_mask);
Expand Down Expand Up @@ -1401,7 +1401,7 @@ static void vlsi_tx_timeout(struct net_device *ndev)

if (vlsi_start_hw(idev))
IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n",
__FUNCTION__, pci_name(idev->pdev), ndev->name);
__FUNCTION__, PCIDEV_NAME(idev->pdev), ndev->name);
else
netif_start_queue(ndev);
}
Expand Down Expand Up @@ -1643,7 +1643,7 @@ vlsi_irda_probe(struct pci_dev *pdev, const struct pci_device_id *id)
pdev->current_state = 0; /* hw must be running now */

IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n",
drivername, pci_name(pdev));
drivername, PCIDEV_NAME(pdev));

if ( !pci_resource_start(pdev,0)
|| !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) {
Expand Down Expand Up @@ -1728,7 +1728,7 @@ static void __devexit vlsi_irda_remove(struct pci_dev *pdev)

pci_set_drvdata(pdev, NULL);

IRDA_MESSAGE("%s: %s removed\n", drivername, pci_name(pdev));
IRDA_MESSAGE("%s: %s removed\n", drivername, PCIDEV_NAME(pdev));
}

#ifdef CONFIG_PM
Expand All @@ -1748,7 +1748,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state)

if (!ndev) {
IRDA_ERROR("%s - %s: no netdevice \n",
__FUNCTION__, pci_name(pdev));
__FUNCTION__, PCIDEV_NAME(pdev));
return 0;
}
idev = ndev->priv;
Expand All @@ -1759,7 +1759,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state)
pdev->current_state = state.event;
}
else
IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, pci_name(pdev), pdev->current_state, state.event);
IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state.event);
up(&idev->sem);
return 0;
}
Expand Down Expand Up @@ -1787,15 +1787,15 @@ static int vlsi_irda_resume(struct pci_dev *pdev)

if (!ndev) {
IRDA_ERROR("%s - %s: no netdevice \n",
__FUNCTION__, pci_name(pdev));
__FUNCTION__, PCIDEV_NAME(pdev));
return 0;
}
idev = ndev->priv;
down(&idev->sem);
if (pdev->current_state == 0) {
up(&idev->sem);
IRDA_WARNING("%s - %s: already resumed\n",
__FUNCTION__, pci_name(pdev));
__FUNCTION__, PCIDEV_NAME(pdev));
return 0;
}

Expand Down
33 changes: 33 additions & 0 deletions trunk/drivers/net/irda/vlsi_ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,39 @@
#define PCI_CLASS_SUBCLASS_MASK 0xffff
#endif

/* in recent 2.5 interrupt handlers have non-void return value */
#ifndef IRQ_RETVAL
typedef void irqreturn_t;
#define IRQ_NONE
#define IRQ_HANDLED
#define IRQ_RETVAL(x)
#endif

/* some stuff need to check kernelversion. Not all 2.5 stuff was present
* in early 2.5.x - the test is merely to separate 2.4 from 2.5
*/
#include <linux/version.h>

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)

/* PDE() introduced in 2.5.4 */
#ifdef CONFIG_PROC_FS
#define PDE(inode) ((inode)->i_private)
#endif

/* irda crc16 calculation exported in 2.5.42 */
#define irda_calc_crc16(fcs,buf,len) (GOOD_FCS)

/* we use this for unified pci device name access */
#define PCIDEV_NAME(pdev) ((pdev)->name)

#else /* 2.5 or later */

/* whatever we get from the associated struct device - bus:slot:dev.fn id */
#define PCIDEV_NAME(pdev) (pci_name(pdev))

#endif

/* ================================================================ */

/* non-standard PCI registers */
Expand Down
11 changes: 2 additions & 9 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,6 @@ int mv643xx_eth_free_tx_descs(struct net_device *dev, int force)

while (mp->tx_desc_count > 0) {
spin_lock_irqsave(&mp->lock, flags);

/* tx_desc_count might have changed before acquiring the lock */
if (mp->tx_desc_count <= 0) {
spin_unlock_irqrestore(&mp->lock, flags);
return released;
}

tx_index = mp->tx_used_desc_q;
desc = &mp->p_tx_desc_area[tx_index];
cmd_sts = desc->cmd_sts;
Expand All @@ -339,13 +332,13 @@ int mv643xx_eth_free_tx_descs(struct net_device *dev, int force)
if (skb)
mp->tx_skb[tx_index] = NULL;

spin_unlock_irqrestore(&mp->lock, flags);

if (cmd_sts & ETH_ERROR_SUMMARY) {
printk("%s: Error in TX\n", dev->name);
mp->stats.tx_errors++;
}

spin_unlock_irqrestore(&mp->lock, flags);

if (cmd_sts & ETH_TX_FIRST_DESC)
dma_unmap_single(NULL, addr, count, DMA_TO_DEVICE);
else
Expand Down
4 changes: 0 additions & 4 deletions trunk/fs/cifs/CHANGES
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
Version 1.47
------------
Fix oops in list_del during mount caused by unaligned string.

Version 1.46
------------
Support deep tree mounts. Better support OS/2, Win9x (DOS) time stamps.
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/cifs/cifs_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ cifs_debug_data_read(char *buf, char **beginBuffer, off_t offset,
ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);
if((ses->serverDomain == NULL) || (ses->serverOS == NULL) ||
(ses->serverNOS == NULL)) {
buf += sprintf(buf, "\nentry for %s not fully "
"displayed\n\t", ses->serverName);
buf += sprintf("\nentry for %s not fully displayed\n\t",
ses->serverName);

} else {
length =
Expand Down
Loading

0 comments on commit 9defeb6

Please sign in to comment.