From: Jeff Garzik <jgarzik@pobox.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [BK PATCHES] 2.4.x libata updates
Date: Mon, 07 Mar 2005 12:13:15 -0500 [thread overview]
Message-ID: <422C8BAB.3000600@pobox.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: changelog.txt --]
[-- Type: text/plain, Size: 619 bytes --]
Please do a
bk pull bk://kernel.bkbits.net/jgarzik/libata-upstream-2.4
This will update the following files:
drivers/scsi/libata-core.c | 9 ++++-----
drivers/scsi/sata_nv.c | 6 ++++--
drivers/scsi/sata_qstor.c | 30 ++++++++++++++++++++++++------
drivers/scsi/sata_sil.c | 2 +-
drivers/scsi/sata_svw.c | 4 ++--
drivers/scsi/sata_vsc.c | 3 ++-
6 files changed, 37 insertions(+), 17 deletions(-)
through these ChangeSets:
<liml:rtr.ca>:
o sata_qstor: eh_timeout fix
Adrian Bunk:
o drivers/scsi/sata_*: make code static
Jeff Garzik:
o [libata] remove_one helper cleanup
[-- Attachment #3: patch --]
[-- Type: text/plain, Size: 5540 bytes --]
diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c 2005-03-07 12:12:34 -05:00
+++ b/drivers/scsi/libata-core.c 2005-03-07 12:12:34 -05:00
@@ -3887,15 +3887,12 @@
if (host_set->mmio_base)
iounmap(host_set->mmio_base);
- pci_release_regions(pdev);
-
for (i = 0; i < host_set->n_ports; i++) {
- struct ata_ioports *ioaddr;
-
ap = host_set->ports[i];
- ioaddr = &ap->ioaddr;
if ((ap->flags & ATA_FLAG_NO_LEGACY) == 0) {
+ struct ata_ioports *ioaddr = &ap->ioaddr;
+
if (ioaddr->cmd_addr == 0x1f0)
release_region(0x1f0, 8);
else if (ioaddr->cmd_addr == 0x170)
@@ -3904,6 +3901,8 @@
}
kfree(host_set);
+
+ pci_release_regions(pdev);
pci_disable_device(pdev);
dev_set_drvdata(dev, NULL);
}
diff -Nru a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
--- a/drivers/scsi/sata_nv.c 2005-03-07 12:12:34 -05:00
+++ b/drivers/scsi/sata_nv.c 2005-03-07 12:12:34 -05:00
@@ -99,7 +99,8 @@
#define NV_MCP_SATA_CFG_20_SATA_SPACE_EN 0x04
static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
-irqreturn_t nv_interrupt (int irq, void *dev_instance, struct pt_regs *regs);
+static irqreturn_t nv_interrupt (int irq, void *dev_instance,
+ struct pt_regs *regs);
static u32 nv_scr_read (struct ata_port *ap, unsigned int sc_reg);
static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
static void nv_host_stop (struct ata_host_set *host_set);
@@ -258,7 +259,8 @@
MODULE_DEVICE_TABLE(pci, nv_pci_tbl);
MODULE_VERSION(DRV_VERSION);
-irqreturn_t nv_interrupt (int irq, void *dev_instance, struct pt_regs *regs)
+static irqreturn_t nv_interrupt (int irq, void *dev_instance,
+ struct pt_regs *regs)
{
struct ata_host_set *host_set = dev_instance;
struct nv_host *host = host_set->private_data;
diff -Nru a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c
--- a/drivers/scsi/sata_qstor.c 2005-03-07 12:12:34 -05:00
+++ b/drivers/scsi/sata_qstor.c 2005-03-07 12:12:34 -05:00
@@ -38,7 +38,7 @@
#include <linux/libata.h>
#define DRV_NAME "sata_qstor"
-#define DRV_VERSION "0.03"
+#define DRV_VERSION "0.04"
enum {
QS_PORTS = 4,
@@ -120,6 +120,7 @@
static void qs_bmdma_stop(struct ata_port *ap);
static u8 qs_bmdma_status(struct ata_port *ap);
static void qs_irq_clear(struct ata_port *ap);
+static void qs_eng_timeout(struct ata_port *ap);
static Scsi_Host_Template qs_ata_sht = {
.module = THIS_MODULE,
@@ -153,7 +154,7 @@
.phy_reset = qs_phy_reset,
.qc_prep = qs_qc_prep,
.qc_issue = qs_qc_issue,
- .eng_timeout = ata_eng_timeout,
+ .eng_timeout = qs_eng_timeout,
.irq_handler = qs_intr,
.irq_clear = qs_irq_clear,
.scr_read = qs_scr_read,
@@ -213,7 +214,7 @@
/* nothing */
}
-static void qs_enter_reg_mode(struct ata_port *ap)
+static inline void qs_enter_reg_mode(struct ata_port *ap)
{
u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000);
@@ -221,15 +222,32 @@
readb(chan + QS_CCT_CTR0); /* flush */
}
-static void qs_phy_reset(struct ata_port *ap)
+static inline void qs_reset_channel_logic(struct ata_port *ap)
{
u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000);
- struct qs_port_priv *pp = ap->private_data;
- pp->state = qs_state_idle;
writeb(QS_CTR1_RCHN, chan + QS_CCT_CTR1);
+ readb(chan + QS_CCT_CTR0); /* flush */
qs_enter_reg_mode(ap);
+}
+
+static void qs_phy_reset(struct ata_port *ap)
+{
+ struct qs_port_priv *pp = ap->private_data;
+
+ pp->state = qs_state_idle;
+ qs_reset_channel_logic(ap);
sata_phy_reset(ap);
+}
+
+static void qs_eng_timeout(struct ata_port *ap)
+{
+ struct qs_port_priv *pp = ap->private_data;
+
+ if (pp->state != qs_state_idle) /* healthy paranoia */
+ pp->state = qs_state_mmio;
+ qs_reset_channel_logic(ap);
+ ata_eng_timeout(ap);
}
static u32 qs_scr_read (struct ata_port *ap, unsigned int sc_reg)
diff -Nru a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
--- a/drivers/scsi/sata_sil.c 2005-03-07 12:12:34 -05:00
+++ b/drivers/scsi/sata_sil.c 2005-03-07 12:12:34 -05:00
@@ -78,7 +78,7 @@
/* TODO firmware versions should be added - eric */
-struct sil_drivelist {
+static const struct sil_drivelist {
const char * product;
unsigned int quirk;
} sil_blacklist [] = {
diff -Nru a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c
--- a/drivers/scsi/sata_svw.c 2005-03-07 12:12:34 -05:00
+++ b/drivers/scsi/sata_svw.c 2005-03-07 12:12:34 -05:00
@@ -156,7 +156,7 @@
* spin_lock_irqsave(host_set lock)
*/
-void k2_bmdma_setup_mmio (struct ata_queued_cmd *qc)
+static void k2_bmdma_setup_mmio (struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE);
@@ -186,7 +186,7 @@
* spin_lock_irqsave(host_set lock)
*/
-void k2_bmdma_start_mmio (struct ata_queued_cmd *qc)
+static void k2_bmdma_start_mmio (struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
void *mmio = (void *) ap->ioaddr.bmdma_addr;
diff -Nru a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c
--- a/drivers/scsi/sata_vsc.c 2005-03-07 12:12:34 -05:00
+++ b/drivers/scsi/sata_vsc.c 2005-03-07 12:12:34 -05:00
@@ -155,7 +155,8 @@
*
* Read the interrupt register and process for the devices that have them pending.
*/
-irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance, struct pt_regs *regs)
+static irqreturn_t vsc_sata_interrupt (int irq, void *dev_instance,
+ struct pt_regs *regs)
{
struct ata_host_set *host_set = dev_instance;
unsigned int i;
next reply other threads:[~2005-03-07 17:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-07 17:13 Jeff Garzik [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-27 20:55 [BK PATCHES] 2.4.x libata updates Jeff Garzik
2004-08-24 3:42 Jeff Garzik
2004-08-18 5:34 Jeff Garzik
2004-08-18 5:35 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=422C8BAB.3000600@pobox.com \
--to=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).