login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
January
»
3
Re: [PATCH] libata: fix combined mode (was Re: Happy New Year (and v2.6.20-rc3 released))
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Steve Wise <swise@...>
To: Alan <alan@...>
Cc: Jeff Garzik <jgarzik@...>, Linus Torvalds <torvalds@...>, Alessandro Suardi <alessandro.suardi@...>, Linux Kernel Mailing List <linux-kernel@...>
Subject:
Re: [PATCH] libata: fix combined mode (was Re: Happy New Year (and v2.6.20-rc3 released))
Date: Wednesday, January 3, 2007 - 3:59 pm
On Tue, 2007-01-02 at 11:58 +0000, Alan wrote: ...
quoted text
> > I'm sending this now rather than after running full test suites so that > it can get the maximal testing in a short time. I'll be running tests on > this after lunch. > > Signed-off-by: Alan Cox <alan@redhat.com> > > --- linux.vanilla-2.6.20-rc3/drivers/ata/libata-sff.c 2007-01-01 21:43:27.000000000 +0000 > +++ linux-2.6.20-rc3/drivers/ata/libata-sff.c 2007-01-02 11:15:53.000000000 +0000 > @@ -1027,13 +1027,15 @@ > #endif > } > > - rc = pci_request_regions(pdev, DRV_NAME); > - if (rc) { > - disable_dev_on_err = 0; > - goto err_out; > - } > - > - if (legacy_mode) { > + if (!legacy_mode) { > + rc = pci_request_regions(pdev, DRV_NAME); > + if (rc) { > + disable_dev_on_err = 0; > + goto err_out; > + } > + } else { > + /* Deal with combined mode hack. This side of the logic all > + goes away once the combined mode hack is killed in 2.6.21 */ > if (!request_region(ATA_PRIMARY_CMD, 8, "libata")) { > struct resource *conflict, res; > res.start = ATA_PRIMARY_CMD; > @@ -1071,6 +1073,13 @@ > } > } else > legacy_mode |= ATA_PORT_SECONDARY; > + > + if (legacy_mode & ATA_PORT_PRIMARY) > + pci_request_region(pdev, 1, DRV_NAME); > + if (legacy_mode & ATA_PORT_SECONDARY) > + pci_request_region(pdev, 3, DRV_NAME); > + /* If there is a DMA resource, allocate it */ > + pci_request_region(pdev, 4, DRV_NAME); > } > > /* we have legacy mode, but all ports are unavailable */ > @@ -1114,11 +1123,20 @@ > err_out_ent: > kfree(probe_ent); > err_out_regions: > - if (legacy_mode & ATA_PORT_PRIMARY) > - release_region(ATA_PRIMARY_CMD, 8); > - if (legacy_mode & ATA_PORT_SECONDARY) > - release_region(ATA_SECONDARY_CMD, 8); > - pci_release_regions(pdev); > + /* All this conditional stuff is needed for the combined mode hack > + until 2.6.21 when it can go */ > + if (legacy_mode) { > + pci_release_region(pdev, 4); > + if (legacy_mode & ATA_PORT_PRIMARY) { > + release_region(ATA_PRIMARY_CMD, 8); > + pci_release_region(pdev, 1); > + } > + if (legacy_mode & ATA_PORT_SECONDARY) { > + release_region(ATA_SECONDARY_CMD, 8); > + pci_release_region(pdev, 3); > + } > + } else > + pci_release_regions(pdev); > err_out: > if (disable_dev_on_err) > pci_disable_device(pdev);
This patch works for me too. Steve. -
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[patch 1/2] x86: apic unification - merge down lapic_get_max...
, Cyrill Gorcunov
, (Wed Dec 31, 8:00 pm)
Re: Happy New Year (and v2.6.20-rc3 released)
, Alessandro Suardi
, (Mon Jan 1, 9:28 am)
Re: Happy New Year (and v2.6.20-rc3 released)
, Linus Torvalds
, (Mon Jan 1, 4:13 pm)
Re: Happy New Year (and v2.6.20-rc3 released)
, Jeff Garzik
, (Mon Jan 1, 4:49 pm)
[PATCH] libata: fix combined mode (was Re: Happy New Year (a...
, Alan
, (Tue Jan 2, 7:58 am)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Steve Wise
, (Wed Jan 3, 3:59 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Alessandro Suardi
, (Tue Jan 2, 8:07 am)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Alan
, (Tue Jan 2, 10:00 am)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Jeff Garzik
, (Tue Jan 2, 5:00 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Alan
, (Tue Jan 2, 5:27 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Jeff Garzik
, (Tue Jan 2, 5:29 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Alan
, (Tue Jan 2, 6:45 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Jeff Garzik
, (Tue Jan 2, 7:04 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Jeff Garzik
, (Tue Jan 2, 7:01 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Alan
, (Tue Jan 2, 7:27 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Jeff Garzik
, (Tue Jan 2, 7:54 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Alan
, (Tue Jan 2, 8:39 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Jeff Garzik
, (Tue Jan 2, 7:43 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Alan
, (Tue Jan 2, 8:36 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Jeff Garzik
, (Tue Jan 2, 9:02 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Jeff Garzik
, (Tue Jan 2, 5:32 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Alan
, (Tue Jan 2, 6:48 pm)
Re: [PATCH] libata: fix combined mode (was Re: Happy New Yea...
, Theodore Tso
, (Tue Jan 2, 12:12 pm)
Re: Happy New Year (and v2.6.20-rc3 released)
, Alan
, (Mon Jan 1, 5:31 pm)
Re: Happy New Year (and v2.6.20-rc3 released)
, Linus Torvalds
, (Mon Jan 1, 7:34 pm)
Re: Happy New Year (and v2.6.20-rc3 released)
, Theodore Tso
, (Mon Jan 1, 10:32 pm)
Re: Happy New Year (and v2.6.20-rc3 released)
, Alan
, (Mon Jan 1, 5:26 pm)
Re: Happy New Year (and v2.6.20-rc3 released)
, Linus Torvalds
, (Tue Jan 2, 12:09 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Linus Torvalds
Re: [PATCH 00/23] per device dirty throttling -v8
Greg KH
[GIT PATCH] driver core patches against 2.6.24
git
:
linux-netdev
:
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Rick Jones
Re: Network latency regressions from 2.6.22 to 2.6.29
Linus Torvalds
Re: [GIT]: Networking
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
2 users
and
846 guests
online.
Online users
brindesesas
olecom
Syndicate