Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56574
b: refs/heads/master
c: b42895d
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed May 18, 2007
1 parent eee81f1 commit 34c0d81
Show file tree
Hide file tree
Showing 26 changed files with 144 additions and 167 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: dd504ea16f34a29da4aa933ae7ab917fcfd25fd7
refs/heads/master: b42895d6fe66995ab101c15d9a59c78474dbf382
25 changes: 12 additions & 13 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -328,21 +328,20 @@ Who: Adrian Bunk <bunk@stusta.de>

---------------------------

What: libata.spindown_compat module parameter
What: libata spindown skipping and warning
When: Dec 2008
Why: halt(8) synchronizes caches for and spins down libata disks
because libata didn't use to spin down disk on system halt
(only synchronized caches).
Spin down on system halt is now implemented and can be tested
using sysfs node /sys/class/scsi_disk/h:c:i:l/manage_start_stop.
Why: Some halt(8) implementations synchronize caches for and spin
down libata disks because libata didn't use to spin down disk on
system halt (only synchronized caches).
Spin down on system halt is now implemented. sysfs node
/sys/class/scsi_disk/h:c:i:l/manage_start_stop is present if
spin down support is available.
Because issuing spin down command to an already spun down disk
makes some disks spin up just to spin down again, the old
behavior needs to be maintained till userspace tool is updated
to check the sysfs node and not to spin down disks with the
node set to one.
This module parameter is to give userspace tool the time to
get updated and should be removed after userspace is
reasonably updated.
makes some disks spin up just to spin down again, libata tracks
device spindown status to skip the extra spindown command and
warn about it.
This is to give userspace tools the time to get updated and will
be removed after userspace is reasonably updated.
Who: Tejun Heo <htejun@gmail.com>

---------------------------
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/networking/netdevices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dev->hard_start_xmit:
for this and return -1 when the spin lock fails.
The locking there should also properly protect against
set_multicast_list
Context: BHs disabled
Context: Process with BHs disabled or BH (timer).
Notes: netif_queue_stopped() is guaranteed false
Interrupts must be enabled when calling hard_start_xmit.
(Interrupts must also be enabled when enabling the BH handler.)
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ int libata_noacpi = 1;
module_param_named(noacpi, libata_noacpi, int, 0444);
MODULE_PARM_DESC(noacpi, "Disables the use of ACPI in suspend/resume when set");

int ata_spindown_compat = 1;
module_param_named(spindown_compat, ata_spindown_compat, int, 0644);
MODULE_PARM_DESC(spindown_compat, "Enable backward compatible spindown "
"behavior. Will be removed. More info can be found in "
"Documentation/feature-removal-schedule.txt\n");

MODULE_AUTHOR("Jeff Garzik");
MODULE_DESCRIPTION("Library module for ATA devices");
MODULE_LICENSE("GPL");
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,15 +893,15 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
return queue_depth;
}

/* XXX: for ata_spindown_compat */
/* XXX: for spindown warning */
static void ata_delayed_done_timerfn(unsigned long arg)
{
struct scsi_cmnd *scmd = (void *)arg;

scmd->scsi_done(scmd);
}

/* XXX: for ata_spindown_compat */
/* XXX: for spindown warning */
static void ata_delayed_done(struct scsi_cmnd *scmd)
{
static struct timer_list timer;
Expand Down Expand Up @@ -966,8 +966,7 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc)
* removed. Read Documentation/feature-removal-schedule.txt
* for more info.
*/
if (ata_spindown_compat &&
(qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
if ((qc->dev->flags & ATA_DFLAG_SPUNDOWN) &&
(system_state == SYSTEM_HALT ||
system_state == SYSTEM_POWER_OFF)) {
static unsigned long warned = 0;
Expand Down Expand Up @@ -1395,7 +1394,7 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
}
}

/* XXX: track spindown state for spindown_compat */
/* XXX: track spindown state for spindown skipping and warning */
if (unlikely(qc->tf.command == ATA_CMD_STANDBY ||
qc->tf.command == ATA_CMD_STANDBYNOW1))
qc->dev->flags |= ATA_DFLAG_SPUNDOWN;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/ata/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ extern int atapi_enabled;
extern int atapi_dmadir;
extern int libata_fua;
extern int libata_noacpi;
extern int ata_spindown_compat;
extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
u64 block, u32 n_block, unsigned int tf_flags,
Expand Down
18 changes: 1 addition & 17 deletions trunk/drivers/ata/sata_nv.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ struct nv_host_priv {
#define NV_ADMA_CHECK_INTR(GCTL, PORT) ((GCTL) & ( 1 << (19 + (12 * (PORT)))))

static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
static void nv_remove_one (struct pci_dev *pdev);
#ifdef CONFIG_PM
static int nv_pci_device_resume(struct pci_dev *pdev);
#endif
Expand Down Expand Up @@ -288,12 +287,6 @@ static const struct pci_device_id nv_pci_tbl[] = {
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), GENERIC },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), GENERIC },
{ PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), GENERIC },
{ PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_IDE<<8, 0xffff00, GENERIC },
{ PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
PCI_ANY_ID, PCI_ANY_ID,
PCI_CLASS_STORAGE_RAID<<8, 0xffff00, GENERIC },

{ } /* terminate list */
};
Expand All @@ -306,7 +299,7 @@ static struct pci_driver nv_pci_driver = {
.suspend = ata_pci_device_suspend,
.resume = nv_pci_device_resume,
#endif
.remove = nv_remove_one,
.remove = ata_pci_remove_one,
};

static struct scsi_host_template nv_sht = {
Expand Down Expand Up @@ -1613,15 +1606,6 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
IRQF_SHARED, ppi[0]->sht);
}

static void nv_remove_one (struct pci_dev *pdev)
{
struct ata_host *host = dev_get_drvdata(&pdev->dev);
struct nv_host_priv *hpriv = host->private_data;

ata_pci_remove_one(pdev);
kfree(hpriv);
}

#ifdef CONFIG_PM
static int nv_pci_device_resume(struct pci_dev *pdev)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/sata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ static int vt6421_prepare_host(struct pci_dev *pdev, struct ata_host **r_host)
return -ENOMEM;
}

rc = pcim_iomap_regions(pdev, 0x1f, DRV_NAME);
rc = pcim_iomap_regions(pdev, 0x3f, DRV_NAME);
if (rc) {
dev_printk(KERN_ERR, &pdev->dev, "failed to request/iomap "
"PCI BARs (errno=%d)\n", rc);
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/e1000/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,9 @@ struct e1000_adapter {
struct e1000_tx_ring test_tx_ring;
struct e1000_rx_ring test_rx_ring;


int msg_enable;
#ifdef CONFIG_PCI_MSI
boolean_t have_msi;
#endif

/* to not mess up cache alignment, always add to the bottom */
boolean_t tso_force;
boolean_t smart_power_down; /* phy smart power down */
Expand Down
39 changes: 14 additions & 25 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ static struct net_device_stats * e1000_get_stats(struct net_device *netdev);
static int e1000_change_mtu(struct net_device *netdev, int new_mtu);
static int e1000_set_mac(struct net_device *netdev, void *p);
static irqreturn_t e1000_intr(int irq, void *data);
#ifdef CONFIG_PCI_MSI
static irqreturn_t e1000_intr_msi(int irq, void *data);
#endif
static boolean_t e1000_clean_tx_irq(struct e1000_adapter *adapter,
struct e1000_tx_ring *tx_ring);
#ifdef CONFIG_E1000_NAPI
Expand Down Expand Up @@ -300,31 +298,26 @@ module_exit(e1000_exit_module);
static int e1000_request_irq(struct e1000_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
int flags, err = 0;
void (*handler) = &e1000_intr;
int irq_flags = IRQF_SHARED;
int err;

flags = IRQF_SHARED;
#ifdef CONFIG_PCI_MSI
if (adapter->hw.mac_type >= e1000_82571) {
adapter->have_msi = TRUE;
if ((err = pci_enable_msi(adapter->pdev))) {
DPRINTK(PROBE, ERR,
"Unable to allocate MSI interrupt Error: %d\n", err);
adapter->have_msi = FALSE;
adapter->have_msi = !pci_enable_msi(adapter->pdev);
if (adapter->have_msi) {
handler = &e1000_intr_msi;
irq_flags = 0;
}
}
if (adapter->have_msi) {
flags &= ~IRQF_SHARED;
err = request_irq(adapter->pdev->irq, &e1000_intr_msi, flags,
netdev->name, netdev);
if (err)
DPRINTK(PROBE, ERR,
"Unable to allocate interrupt Error: %d\n", err);
} else
#endif
if ((err = request_irq(adapter->pdev->irq, &e1000_intr, flags,
netdev->name, netdev)))

err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name,
netdev);
if (err) {
if (adapter->have_msi)
pci_disable_msi(adapter->pdev);
DPRINTK(PROBE, ERR,
"Unable to allocate interrupt Error: %d\n", err);
}

return err;
}
Expand All @@ -335,10 +328,8 @@ static void e1000_free_irq(struct e1000_adapter *adapter)

free_irq(adapter->pdev->irq, netdev);

#ifdef CONFIG_PCI_MSI
if (adapter->have_msi)
pci_disable_msi(adapter->pdev);
#endif
}

/**
Expand Down Expand Up @@ -3744,7 +3735,6 @@ e1000_update_stats(struct e1000_adapter *adapter)

spin_unlock_irqrestore(&adapter->stats_lock, flags);
}
#ifdef CONFIG_PCI_MSI

/**
* e1000_intr_msi - Interrupt Handler
Expand Down Expand Up @@ -3810,7 +3800,6 @@ e1000_intr_msi(int irq, void *data)

return IRQ_HANDLED;
}
#endif

/**
* e1000_intr - Interrupt Handler
Expand Down
11 changes: 11 additions & 0 deletions trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,15 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)

dev->trans_start = jiffies;

/* The powerpc-specific eieio() is used, as wmb() has too strong
* semantics (it requires synchronization between cacheable and
* uncacheable mappings, which eieio doesn't provide and which we
* don't need), thus requiring a more expensive sync instruction. At
* some point, the set of architecture-independent barrier functions
* should be expanded to include weaker barriers.
*/

eieio();
txbdp->status = status;

/* If this was the last BD in the ring, the next one */
Expand Down Expand Up @@ -1301,6 +1310,7 @@ struct sk_buff * gfar_new_skb(struct net_device *dev, struct rxbd8 *bdp)
bdp->length = 0;

/* Mark the buffer empty */
eieio();
bdp->status |= (RXBD_EMPTY | RXBD_INTERRUPT);

return skb;
Expand Down Expand Up @@ -1484,6 +1494,7 @@ int gfar_clean_rx_ring(struct net_device *dev, int rx_work_limit)
bdp = priv->cur_rx;

while (!((bdp->status & RXBD_EMPTY) || (--rx_work_limit < 0))) {
rmb();
skb = priv->rx_skbuff[priv->skb_currx];

if (!(bdp->status &
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ibm_emac/ibm_emac_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ static int emac_link_differs(struct ocp_enet_private *dev)
int duplex = r & EMAC_MR1_FDE ? DUPLEX_FULL : DUPLEX_HALF;
int speed, pause, asym_pause;

if (r & (EMAC_MR1_MF_1000 | EMAC_MR1_MF_1000GPCS))
if (r & EMAC_MR1_MF_1000)
speed = SPEED_1000;
else if (r & EMAC_MR1_MF_100)
speed = SPEED_100;
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/ibm_emac/ibm_emac_mal.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ int __init mal_register_commac(struct ibm_ocp_mal *mal,
return 0;
}

void __exit mal_unregister_commac(struct ibm_ocp_mal *mal,
struct mal_commac *commac)
void mal_unregister_commac(struct ibm_ocp_mal *mal, struct mal_commac *commac)
{
unsigned long flags;
local_irq_save(flags);
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/net/ibm_emac/ibm_emac_mal.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ void mal_exit(void) __exit;

int mal_register_commac(struct ibm_ocp_mal *mal,
struct mal_commac *commac) __init;
void mal_unregister_commac(struct ibm_ocp_mal *mal,
struct mal_commac *commac) __exit;
void mal_unregister_commac(struct ibm_ocp_mal *mal, struct mal_commac *commac);
int mal_set_rcbs(struct ibm_ocp_mal *mal, int channel, unsigned long size);

/* Returns BD ring offset for a particular channel
Expand Down
Loading

0 comments on commit 34c0d81

Please sign in to comment.