Contents of /trunk/kernel26-alx/patches-2.6.23-r1/0100-2.6.23.1-all-fixes.patch
Parent Directory | Revision Log
Revision 658 -
(show annotations)
(download)
Mon Jun 23 21:39:39 2008 UTC (16 years, 3 months ago) by niro
File size: 2971 byte(s)
Mon Jun 23 21:39:39 2008 UTC (16 years, 3 months ago) by niro
File size: 2971 byte(s)
2.6.23-alx-r1: new default as we fix the via epia clocksource=tsc quircks -linux-2.6.23.17 -fbcondecor-0.9.4 -squashfs-3.3 -unionfs-2.3.3 -ipw3945-1.2.2 -mptbase-vmware fix
1 | diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c |
2 | index cb7dec9..d9832e2 100644 |
3 | --- a/drivers/ata/sata_mv.c |
4 | +++ b/drivers/ata/sata_mv.c |
5 | @@ -69,10 +69,11 @@ |
6 | #include <linux/device.h> |
7 | #include <scsi/scsi_host.h> |
8 | #include <scsi/scsi_cmnd.h> |
9 | +#include <scsi/scsi_device.h> |
10 | #include <linux/libata.h> |
11 | |
12 | #define DRV_NAME "sata_mv" |
13 | -#define DRV_VERSION "1.0" |
14 | +#define DRV_VERSION "1.01" |
15 | |
16 | enum { |
17 | /* BAR's are enumerated in terms of pci_resource_start() terms */ |
18 | @@ -420,6 +421,7 @@ static void mv_error_handler(struct ata_port *ap); |
19 | static void mv_post_int_cmd(struct ata_queued_cmd *qc); |
20 | static void mv_eh_freeze(struct ata_port *ap); |
21 | static void mv_eh_thaw(struct ata_port *ap); |
22 | +static int mv_slave_config(struct scsi_device *sdev); |
23 | static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); |
24 | |
25 | static void mv5_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio, |
26 | @@ -457,7 +459,7 @@ static struct scsi_host_template mv5_sht = { |
27 | .use_clustering = 1, |
28 | .proc_name = DRV_NAME, |
29 | .dma_boundary = MV_DMA_BOUNDARY, |
30 | - .slave_configure = ata_scsi_slave_config, |
31 | + .slave_configure = mv_slave_config, |
32 | .slave_destroy = ata_scsi_slave_destroy, |
33 | .bios_param = ata_std_bios_param, |
34 | }; |
35 | @@ -475,7 +477,7 @@ static struct scsi_host_template mv6_sht = { |
36 | .use_clustering = 1, |
37 | .proc_name = DRV_NAME, |
38 | .dma_boundary = MV_DMA_BOUNDARY, |
39 | - .slave_configure = ata_scsi_slave_config, |
40 | + .slave_configure = mv_slave_config, |
41 | .slave_destroy = ata_scsi_slave_destroy, |
42 | .bios_param = ata_std_bios_param, |
43 | }; |
44 | @@ -763,6 +765,17 @@ static void mv_irq_clear(struct ata_port *ap) |
45 | { |
46 | } |
47 | |
48 | +static int mv_slave_config(struct scsi_device *sdev) |
49 | +{ |
50 | + int rc = ata_scsi_slave_config(sdev); |
51 | + if (rc) |
52 | + return rc; |
53 | + |
54 | + blk_queue_max_phys_segments(sdev->request_queue, MV_MAX_SG_CT / 2); |
55 | + |
56 | + return 0; /* scsi layer doesn't check return value, sigh */ |
57 | +} |
58 | + |
59 | static void mv_set_edma_ptrs(void __iomem *port_mmio, |
60 | struct mv_host_priv *hpriv, |
61 | struct mv_port_priv *pp) |
62 | @@ -1130,10 +1143,9 @@ static void mv_port_stop(struct ata_port *ap) |
63 | * LOCKING: |
64 | * Inherited from caller. |
65 | */ |
66 | -static unsigned int mv_fill_sg(struct ata_queued_cmd *qc) |
67 | +static void mv_fill_sg(struct ata_queued_cmd *qc) |
68 | { |
69 | struct mv_port_priv *pp = qc->ap->private_data; |
70 | - unsigned int n_sg = 0; |
71 | struct scatterlist *sg; |
72 | struct mv_sg *mv_sg; |
73 | |
74 | @@ -1151,7 +1163,7 @@ static unsigned int mv_fill_sg(struct ata_queued_cmd *qc) |
75 | |
76 | mv_sg->addr = cpu_to_le32(addr & 0xffffffff); |
77 | mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16); |
78 | - mv_sg->flags_size = cpu_to_le32(len); |
79 | + mv_sg->flags_size = cpu_to_le32(len & 0xffff); |
80 | |
81 | sg_len -= len; |
82 | addr += len; |
83 | @@ -1160,12 +1172,9 @@ static unsigned int mv_fill_sg(struct ata_queued_cmd *qc) |
84 | mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL); |
85 | |
86 | mv_sg++; |
87 | - n_sg++; |
88 | } |
89 | |
90 | } |
91 | - |
92 | - return n_sg; |
93 | } |
94 | |
95 | static inline void mv_crqb_pack_cmd(__le16 *cmdw, u8 data, u8 addr, unsigned last) |