mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
Merge commit 'v2.6.37-rc8' into perf/core
Merge reason: pick up latest -rc. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
commit
cc22219699
@ -516,6 +516,7 @@ int main(int argc, char *argv[])
|
||||
default:
|
||||
fprintf(stderr, "Unknown nla_type %d\n",
|
||||
na->nla_type);
|
||||
case TASKSTATS_TYPE_NULL:
|
||||
break;
|
||||
}
|
||||
na = (struct nlattr *) (GENLMSG_DATA(&msg) + len);
|
||||
|
@ -1044,9 +1044,9 @@ Details:
|
||||
|
||||
|
||||
/**
|
||||
* queuecommand - queue scsi command, invoke 'done' on completion
|
||||
* queuecommand - queue scsi command, invoke scp->scsi_done on completion
|
||||
* @shost: pointer to the scsi host object
|
||||
* @scp: pointer to scsi command object
|
||||
* @done: function pointer to be invoked on completion
|
||||
*
|
||||
* Returns 0 on success.
|
||||
*
|
||||
@ -1074,42 +1074,45 @@ Details:
|
||||
*
|
||||
* Other types of errors that are detected immediately may be
|
||||
* flagged by setting scp->result to an appropriate value,
|
||||
* invoking the 'done' callback, and then returning 0 from this
|
||||
* function. If the command is not performed immediately (and the
|
||||
* LLD is starting (or will start) the given command) then this
|
||||
* function should place 0 in scp->result and return 0.
|
||||
* invoking the scp->scsi_done callback, and then returning 0
|
||||
* from this function. If the command is not performed
|
||||
* immediately (and the LLD is starting (or will start) the given
|
||||
* command) then this function should place 0 in scp->result and
|
||||
* return 0.
|
||||
*
|
||||
* Command ownership. If the driver returns zero, it owns the
|
||||
* command and must take responsibility for ensuring the 'done'
|
||||
* callback is executed. Note: the driver may call done before
|
||||
* returning zero, but after it has called done, it may not
|
||||
* return any value other than zero. If the driver makes a
|
||||
* non-zero return, it must not execute the command's done
|
||||
* callback at any time.
|
||||
* command and must take responsibility for ensuring the
|
||||
* scp->scsi_done callback is executed. Note: the driver may
|
||||
* call scp->scsi_done before returning zero, but after it has
|
||||
* called scp->scsi_done, it may not return any value other than
|
||||
* zero. If the driver makes a non-zero return, it must not
|
||||
* execute the command's scsi_done callback at any time.
|
||||
*
|
||||
* Locks: struct Scsi_Host::host_lock held on entry (with "irqsave")
|
||||
* and is expected to be held on return.
|
||||
* Locks: up to and including 2.6.36, struct Scsi_Host::host_lock
|
||||
* held on entry (with "irqsave") and is expected to be
|
||||
* held on return. From 2.6.37 onwards, queuecommand is
|
||||
* called without any locks held.
|
||||
*
|
||||
* Calling context: in interrupt (soft irq) or process context
|
||||
*
|
||||
* Notes: This function should be relatively fast. Normally it will
|
||||
* not wait for IO to complete. Hence the 'done' callback is invoked
|
||||
* (often directly from an interrupt service routine) some time after
|
||||
* this function has returned. In some cases (e.g. pseudo adapter
|
||||
* drivers that manufacture the response to a SCSI INQUIRY)
|
||||
* the 'done' callback may be invoked before this function returns.
|
||||
* If the 'done' callback is not invoked within a certain period
|
||||
* the SCSI mid level will commence error processing.
|
||||
* If a status of CHECK CONDITION is placed in "result" when the
|
||||
* 'done' callback is invoked, then the LLD driver should
|
||||
* perform autosense and fill in the struct scsi_cmnd::sense_buffer
|
||||
* Notes: This function should be relatively fast. Normally it
|
||||
* will not wait for IO to complete. Hence the scp->scsi_done
|
||||
* callback is invoked (often directly from an interrupt service
|
||||
* routine) some time after this function has returned. In some
|
||||
* cases (e.g. pseudo adapter drivers that manufacture the
|
||||
* response to a SCSI INQUIRY) the scp->scsi_done callback may be
|
||||
* invoked before this function returns. If the scp->scsi_done
|
||||
* callback is not invoked within a certain period the SCSI mid
|
||||
* level will commence error processing. If a status of CHECK
|
||||
* CONDITION is placed in "result" when the scp->scsi_done
|
||||
* callback is invoked, then the LLD driver should perform
|
||||
* autosense and fill in the struct scsi_cmnd::sense_buffer
|
||||
* array. The scsi_cmnd::sense_buffer array is zeroed prior to
|
||||
* the mid level queuing a command to an LLD.
|
||||
*
|
||||
* Defined in: LLD
|
||||
**/
|
||||
int queuecommand(struct scsi_cmnd * scp,
|
||||
void (*done)(struct scsi_cmnd *))
|
||||
int queuecommand(struct Scsi_Host *shost, struct scsi_cmnd * scp)
|
||||
|
||||
|
||||
/**
|
||||
|
@ -373,9 +373,18 @@ EVENT_PROCESS:
|
||||
print " $regex_lru_isolate/o\n";
|
||||
next;
|
||||
}
|
||||
my $isolate_mode = $1;
|
||||
my $nr_scanned = $4;
|
||||
my $nr_contig_dirty = $7;
|
||||
$perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned;
|
||||
|
||||
# To closer match vmstat scanning statistics, only count isolate_both
|
||||
# and isolate_inactive as scanning. isolate_active is rotation
|
||||
# isolate_inactive == 0
|
||||
# isolate_active == 1
|
||||
# isolate_both == 2
|
||||
if ($isolate_mode != 1) {
|
||||
$perprocesspid{$process_pid}->{HIGH_NR_SCANNED} += $nr_scanned;
|
||||
}
|
||||
$perprocesspid{$process_pid}->{HIGH_NR_CONTIG_DIRTY} += $nr_contig_dirty;
|
||||
} elsif ($tracepoint eq "mm_vmscan_lru_shrink_inactive") {
|
||||
$details = $5;
|
||||
|
@ -405,7 +405,7 @@ S: Supported
|
||||
F: drivers/usb/gadget/amd5536udc.*
|
||||
|
||||
AMD GEODE PROCESSOR/CHIPSET SUPPORT
|
||||
P: Jordan Crouse
|
||||
P: Andres Salomon <dilinger@queued.net>
|
||||
L: linux-geode@lists.infradead.org (moderated for non-subscribers)
|
||||
W: http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_11363,00.html
|
||||
S: Supported
|
||||
@ -4590,7 +4590,7 @@ F: drivers/pcmcia/
|
||||
F: include/pcmcia/
|
||||
|
||||
PCNET32 NETWORK DRIVER
|
||||
M: Don Fry <pcnet32@verizon.net>
|
||||
M: Don Fry <pcnet32@frontier.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/pcnet32.c
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 37
|
||||
EXTRAVERSION = -rc7
|
||||
EXTRAVERSION = -rc8
|
||||
NAME = Flesh-Eating Bats with Fangs
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -352,3 +352,4 @@ struct pci_bus * __init it8152_pci_scan_bus(int nr, struct pci_sys_data *sys)
|
||||
return pci_scan_bus(nr, &it8152_ops, sys);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(dma_set_coherent_mask);
|
||||
|
@ -74,6 +74,8 @@
|
||||
#define AT91_MCI_TRTYP_BLOCK (0 << 19)
|
||||
#define AT91_MCI_TRTYP_MULTIPLE (1 << 19)
|
||||
#define AT91_MCI_TRTYP_STREAM (2 << 19)
|
||||
#define AT91_MCI_TRTYP_SDIO_BYTE (4 << 19)
|
||||
#define AT91_MCI_TRTYP_SDIO_BLOCK (5 << 19)
|
||||
|
||||
#define AT91_MCI_BLKR 0x18 /* Block Register */
|
||||
#define AT91_MCI_BLKR_BCNT(n) ((0xffff & (n)) << 0) /* Block count */
|
||||
|
@ -513,4 +513,4 @@ int dma_set_coherent_mask(struct device *dev, u64 mask)
|
||||
|
||||
EXPORT_SYMBOL(ixp4xx_pci_read);
|
||||
EXPORT_SYMBOL(ixp4xx_pci_write);
|
||||
|
||||
EXPORT_SYMBOL(dma_set_coherent_mask);
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include <linux/of_gpio.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/watchdog.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
@ -140,7 +140,7 @@ void __init init_se7206_IRQ(void)
|
||||
make_se7206_irq(IRQ1_IRQ); /* ATA */
|
||||
make_se7206_irq(IRQ3_IRQ); /* SLOT / PCM */
|
||||
|
||||
__raw_writew(__raw_readw(INTC_ICR1) | 0x000b, INTC_ICR); /* ICR1 */
|
||||
__raw_writew(__raw_readw(INTC_ICR1) | 0x000b, INTC_ICR1); /* ICR1 */
|
||||
|
||||
/* FPGA System register setup*/
|
||||
__raw_writew(0x0000,INTSTS0); /* Clear INTSTS0 */
|
||||
|
@ -34,7 +34,7 @@ static const int pfc_divisors[]={1,2,3,4,6,8,12};
|
||||
|
||||
static void master_clk_init(struct clk *clk)
|
||||
{
|
||||
return 10000000 * PLL2 * pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007];
|
||||
clk->rate = 10000000 * PLL2 * pll1rate[(__raw_readw(FREQCR) >> 8) & 0x0007];
|
||||
}
|
||||
|
||||
static struct clk_ops sh7201_master_clk_ops = {
|
||||
|
@ -81,8 +81,7 @@ static void shoc_clk_init(struct clk *clk)
|
||||
for (i = 0; i < ARRAY_SIZE(frqcr3_divisors); i++) {
|
||||
int divisor = frqcr3_divisors[i];
|
||||
|
||||
if (clk->ops->set_rate(clk, clk->parent->rate /
|
||||
divisor, 0) == 0)
|
||||
if (clk->ops->set_rate(clk, clk->parent->rate / divisor) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -364,8 +364,7 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
|
||||
|
||||
/* For performance reasons, reuse mc area when possible */
|
||||
if (!mc || mc_size > curr_mc_size) {
|
||||
if (mc)
|
||||
vfree(mc);
|
||||
vfree(mc);
|
||||
mc = vmalloc(mc_size);
|
||||
if (!mc)
|
||||
break;
|
||||
@ -374,13 +373,11 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
|
||||
|
||||
if (get_ucode_data(mc, ucode_ptr, mc_size) ||
|
||||
microcode_sanity_check(mc) < 0) {
|
||||
vfree(mc);
|
||||
break;
|
||||
}
|
||||
|
||||
if (get_matching_microcode(&uci->cpu_sig, mc, new_rev)) {
|
||||
if (new_mc)
|
||||
vfree(new_mc);
|
||||
vfree(new_mc);
|
||||
new_rev = mc_header.rev;
|
||||
new_mc = mc;
|
||||
mc = NULL; /* trigger new vmalloc */
|
||||
@ -390,12 +387,10 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
|
||||
leftover -= mc_size;
|
||||
}
|
||||
|
||||
if (mc)
|
||||
vfree(mc);
|
||||
vfree(mc);
|
||||
|
||||
if (leftover) {
|
||||
if (new_mc)
|
||||
vfree(new_mc);
|
||||
vfree(new_mc);
|
||||
state = UCODE_ERROR;
|
||||
goto out;
|
||||
}
|
||||
@ -405,8 +400,7 @@ static enum ucode_state generic_load_microcode(int cpu, void *data, size_t size,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (uci->mc)
|
||||
vfree(uci->mc);
|
||||
vfree(uci->mc);
|
||||
uci->mc = (struct microcode_intel *)new_mc;
|
||||
|
||||
pr_debug("CPU%d found a matching microcode update with version 0x%x (current=0x%x)\n",
|
||||
|
@ -501,7 +501,18 @@ static inline unsigned long long get_total_mem(void)
|
||||
return total << PAGE_SHIFT;
|
||||
}
|
||||
|
||||
#define DEFAULT_BZIMAGE_ADDR_MAX 0x37FFFFFF
|
||||
/*
|
||||
* Keep the crash kernel below this limit. On 32 bits earlier kernels
|
||||
* would limit the kernel to the low 512 MiB due to mapping restrictions.
|
||||
* On 64 bits, kexec-tools currently limits us to 896 MiB; increase this
|
||||
* limit once kexec-tools are fixed.
|
||||
*/
|
||||
#ifdef CONFIG_X86_32
|
||||
# define CRASH_KERNEL_ADDR_MAX (512 << 20)
|
||||
#else
|
||||
# define CRASH_KERNEL_ADDR_MAX (896 << 20)
|
||||
#endif
|
||||
|
||||
static void __init reserve_crashkernel(void)
|
||||
{
|
||||
unsigned long long total_mem;
|
||||
@ -520,10 +531,10 @@ static void __init reserve_crashkernel(void)
|
||||
const unsigned long long alignment = 16<<20; /* 16M */
|
||||
|
||||
/*
|
||||
* kexec want bzImage is below DEFAULT_BZIMAGE_ADDR_MAX
|
||||
* kexec want bzImage is below CRASH_KERNEL_ADDR_MAX
|
||||
*/
|
||||
crash_base = memblock_find_in_range(alignment,
|
||||
DEFAULT_BZIMAGE_ADDR_MAX, crash_size, alignment);
|
||||
CRASH_KERNEL_ADDR_MAX, crash_size, alignment);
|
||||
|
||||
if (crash_base == MEMBLOCK_ERROR) {
|
||||
pr_info("crashkernel reservation failed - No suitable area found.\n");
|
||||
|
@ -408,6 +408,9 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
|
||||
return_ACPI_STATUS(AE_OK);
|
||||
}
|
||||
|
||||
/* Disable the GPE in case it's been enabled already. */
|
||||
(void)acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_DISABLE);
|
||||
|
||||
/*
|
||||
* Add the GPE information from above to the gpe_event_info block for
|
||||
* use during dispatch of this GPE.
|
||||
|
@ -130,8 +130,6 @@ struct acpi_battery {
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
static int acpi_battery_update(struct acpi_battery *battery);
|
||||
|
||||
#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
|
||||
|
||||
inline int acpi_battery_present(struct acpi_battery *battery)
|
||||
@ -186,9 +184,6 @@ static int acpi_battery_get_property(struct power_supply *psy,
|
||||
int ret = 0;
|
||||
struct acpi_battery *battery = to_acpi_battery(psy);
|
||||
|
||||
if (acpi_battery_update(battery))
|
||||
return -ENODEV;
|
||||
|
||||
if (acpi_battery_present(battery)) {
|
||||
/* run battery update only if it is present */
|
||||
acpi_battery_get_state(battery);
|
||||
|
@ -705,54 +705,85 @@ static int acpi_bus_get_perf_flags(struct acpi_device *device)
|
||||
}
|
||||
|
||||
static acpi_status
|
||||
acpi_bus_extract_wakeup_device_power_package(struct acpi_device *device,
|
||||
union acpi_object *package)
|
||||
acpi_bus_extract_wakeup_device_power_package(acpi_handle handle,
|
||||
struct acpi_device_wakeup *wakeup)
|
||||
{
|
||||
int i = 0;
|
||||
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
|
||||
union acpi_object *package = NULL;
|
||||
union acpi_object *element = NULL;
|
||||
acpi_status status;
|
||||
int i = 0;
|
||||
|
||||
if (!device || !package || (package->package.count < 2))
|
||||
if (!wakeup)
|
||||
return AE_BAD_PARAMETER;
|
||||
|
||||
/* _PRW */
|
||||
status = acpi_evaluate_object(handle, "_PRW", NULL, &buffer);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRW"));
|
||||
return status;
|
||||
}
|
||||
|
||||
package = (union acpi_object *)buffer.pointer;
|
||||
|
||||
if (!package || (package->package.count < 2)) {
|
||||
status = AE_BAD_DATA;
|
||||
goto out;
|
||||
}
|
||||
|
||||
element = &(package->package.elements[0]);
|
||||
if (!element)
|
||||
return AE_BAD_PARAMETER;
|
||||
if (!element) {
|
||||
status = AE_BAD_DATA;
|
||||
goto out;
|
||||
}
|
||||
if (element->type == ACPI_TYPE_PACKAGE) {
|
||||
if ((element->package.count < 2) ||
|
||||
(element->package.elements[0].type !=
|
||||
ACPI_TYPE_LOCAL_REFERENCE)
|
||||
|| (element->package.elements[1].type != ACPI_TYPE_INTEGER))
|
||||
return AE_BAD_DATA;
|
||||
device->wakeup.gpe_device =
|
||||
|| (element->package.elements[1].type != ACPI_TYPE_INTEGER)) {
|
||||
status = AE_BAD_DATA;
|
||||
goto out;
|
||||
}
|
||||
wakeup->gpe_device =
|
||||
element->package.elements[0].reference.handle;
|
||||
device->wakeup.gpe_number =
|
||||
wakeup->gpe_number =
|
||||
(u32) element->package.elements[1].integer.value;
|
||||
} else if (element->type == ACPI_TYPE_INTEGER) {
|
||||
device->wakeup.gpe_number = element->integer.value;
|
||||
} else
|
||||
return AE_BAD_DATA;
|
||||
wakeup->gpe_device = NULL;
|
||||
wakeup->gpe_number = element->integer.value;
|
||||
} else {
|
||||
status = AE_BAD_DATA;
|
||||
goto out;
|
||||
}
|
||||
|
||||
element = &(package->package.elements[1]);
|
||||
if (element->type != ACPI_TYPE_INTEGER) {
|
||||
return AE_BAD_DATA;
|
||||
status = AE_BAD_DATA;
|
||||
goto out;
|
||||
}
|
||||
device->wakeup.sleep_state = element->integer.value;
|
||||
wakeup->sleep_state = element->integer.value;
|
||||
|
||||
if ((package->package.count - 2) > ACPI_MAX_HANDLES) {
|
||||
return AE_NO_MEMORY;
|
||||
status = AE_NO_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
device->wakeup.resources.count = package->package.count - 2;
|
||||
for (i = 0; i < device->wakeup.resources.count; i++) {
|
||||
wakeup->resources.count = package->package.count - 2;
|
||||
for (i = 0; i < wakeup->resources.count; i++) {
|
||||
element = &(package->package.elements[i + 2]);
|
||||
if (element->type != ACPI_TYPE_LOCAL_REFERENCE)
|
||||
return AE_BAD_DATA;
|
||||
if (element->type != ACPI_TYPE_LOCAL_REFERENCE) {
|
||||
status = AE_BAD_DATA;
|
||||
goto out;
|
||||
}
|
||||
|
||||
device->wakeup.resources.handles[i] = element->reference.handle;
|
||||
wakeup->resources.handles[i] = element->reference.handle;
|
||||
}
|
||||
|
||||
acpi_gpe_can_wake(device->wakeup.gpe_device, device->wakeup.gpe_number);
|
||||
acpi_gpe_can_wake(wakeup->gpe_device, wakeup->gpe_number);
|
||||
|
||||
return AE_OK;
|
||||
out:
|
||||
kfree(buffer.pointer);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
|
||||
@ -787,26 +818,15 @@ static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
|
||||
static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
|
||||
{
|
||||
acpi_status status = 0;
|
||||
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
|
||||
union acpi_object *package = NULL;
|
||||
int psw_error;
|
||||
|
||||
/* _PRW */
|
||||
status = acpi_evaluate_object(device->handle, "_PRW", NULL, &buffer);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRW"));
|
||||
goto end;
|
||||
}
|
||||
|
||||
package = (union acpi_object *)buffer.pointer;
|
||||
status = acpi_bus_extract_wakeup_device_power_package(device, package);
|
||||
status = acpi_bus_extract_wakeup_device_power_package(device->handle,
|
||||
&device->wakeup);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
ACPI_EXCEPTION((AE_INFO, status, "Extracting _PRW package"));
|
||||
goto end;
|
||||
}
|
||||
|
||||
kfree(buffer.pointer);
|
||||
|
||||
device->wakeup.flags.valid = 1;
|
||||
device->wakeup.prepare_count = 0;
|
||||
acpi_bus_set_run_wake_flags(device);
|
||||
@ -1351,6 +1371,7 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
|
||||
struct acpi_bus_ops *ops = context;
|
||||
int type;
|
||||
unsigned long long sta;
|
||||
struct acpi_device_wakeup wakeup;
|
||||
struct acpi_device *device;
|
||||
acpi_status status;
|
||||
int result;
|
||||
@ -1360,8 +1381,10 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
|
||||
return AE_OK;
|
||||
|
||||
if (!(sta & ACPI_STA_DEVICE_PRESENT) &&
|
||||
!(sta & ACPI_STA_DEVICE_FUNCTIONING))
|
||||
!(sta & ACPI_STA_DEVICE_FUNCTIONING)) {
|
||||
acpi_bus_extract_wakeup_device_power_package(handle, &wakeup);
|
||||
return AE_CTRL_DEPTH;
|
||||
}
|
||||
|
||||
/*
|
||||
* We may already have an acpi_device from a previous enumeration. If
|
||||
|
@ -128,16 +128,6 @@ config PDC_ADMA
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config PATA_MPC52xx
|
||||
tristate "Freescale MPC52xx SoC internal IDE"
|
||||
depends on PPC_MPC52xx && PPC_BESTCOMM
|
||||
select PPC_BESTCOMM_ATA
|
||||
help
|
||||
This option enables support for integrated IDE controller
|
||||
of the Freescale MPC52xx SoC.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config PATA_OCTEON_CF
|
||||
tristate "OCTEON Boot Bus Compact Flash support"
|
||||
depends on CPU_CAVIUM_OCTEON
|
||||
@ -366,7 +356,7 @@ config PATA_CS5535
|
||||
|
||||
config PATA_CS5536
|
||||
tristate "CS5536 PATA support"
|
||||
depends on PCI && X86 && !X86_64
|
||||
depends on PCI
|
||||
help
|
||||
This option enables support for the AMD CS5536
|
||||
companion chip used with the Geode LX processor family.
|
||||
@ -491,6 +481,16 @@ config PATA_MARVELL
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config PATA_MPC52xx
|
||||
tristate "Freescale MPC52xx SoC internal IDE"
|
||||
depends on PPC_MPC52xx && PPC_BESTCOMM
|
||||
select PPC_BESTCOMM_ATA
|
||||
help
|
||||
This option enables support for integrated IDE controller
|
||||
of the Freescale MPC52xx SoC.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config PATA_NETCELL
|
||||
tristate "NETCELL Revolution RAID support"
|
||||
depends on PCI
|
||||
|
@ -11,7 +11,6 @@ obj-$(CONFIG_SATA_DWC) += sata_dwc_460ex.o
|
||||
|
||||
# SFF w/ custom DMA
|
||||
obj-$(CONFIG_PDC_ADMA) += pdc_adma.o
|
||||
obj-$(CONFIG_PATA_MPC52xx) += pata_mpc52xx.o
|
||||
obj-$(CONFIG_PATA_OCTEON_CF) += pata_octeon_cf.o
|
||||
obj-$(CONFIG_SATA_QSTOR) += sata_qstor.o
|
||||
obj-$(CONFIG_SATA_SX4) += sata_sx4.o
|
||||
@ -52,6 +51,7 @@ obj-$(CONFIG_PATA_IT821X) += pata_it821x.o
|
||||
obj-$(CONFIG_PATA_JMICRON) += pata_jmicron.o
|
||||
obj-$(CONFIG_PATA_MACIO) += pata_macio.o
|
||||
obj-$(CONFIG_PATA_MARVELL) += pata_marvell.o
|
||||
obj-$(CONFIG_PATA_MPC52xx) += pata_mpc52xx.o
|
||||
obj-$(CONFIG_PATA_NETCELL) += pata_netcell.o
|
||||
obj-$(CONFIG_PATA_NINJA32) += pata_ninja32.o
|
||||
obj-$(CONFIG_PATA_NS87415) += pata_ns87415.o
|
||||
|
@ -4807,9 +4807,6 @@ static void ata_verify_xfer(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct ata_device *dev = qc->dev;
|
||||
|
||||
if (ata_tag_internal(qc->tag))
|
||||
return;
|
||||
|
||||
if (ata_is_nodata(qc->tf.protocol))
|
||||
return;
|
||||
|
||||
@ -4858,14 +4855,23 @@ void ata_qc_complete(struct ata_queued_cmd *qc)
|
||||
if (unlikely(qc->err_mask))
|
||||
qc->flags |= ATA_QCFLAG_FAILED;
|
||||
|
||||
if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
|
||||
/* always fill result TF for failed qc */
|
||||
/*
|
||||
* Finish internal commands without any further processing
|
||||
* and always with the result TF filled.
|
||||
*/
|
||||
if (unlikely(ata_tag_internal(qc->tag))) {
|
||||
fill_result_tf(qc);
|
||||
__ata_qc_complete(qc);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ata_tag_internal(qc->tag))
|
||||
ata_qc_schedule_eh(qc);
|
||||
else
|
||||
__ata_qc_complete(qc);
|
||||
/*
|
||||
* Non-internal qc has failed. Fill the result TF and
|
||||
* summon EH.
|
||||
*/
|
||||
if (unlikely(qc->flags & ATA_QCFLAG_FAILED)) {
|
||||
fill_result_tf(qc);
|
||||
ata_qc_schedule_eh(qc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3275,6 +3275,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
|
||||
struct ata_port *ap = ata_is_host_link(link) ? link->ap : NULL;
|
||||
struct ata_eh_context *ehc = &link->eh_context;
|
||||
struct ata_device *dev, *link_dev = NULL, *lpm_dev = NULL;
|
||||
enum ata_lpm_policy old_policy = link->lpm_policy;
|
||||
unsigned int hints = ATA_LPM_EMPTY | ATA_LPM_HIPM;
|
||||
unsigned int err_mask;
|
||||
int rc;
|
||||
@ -3338,6 +3339,14 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/*
|
||||
* Low level driver acked the transition. Issue DIPM command
|
||||
* with the new policy set.
|
||||
*/
|
||||
link->lpm_policy = policy;
|
||||
if (ap && ap->slave_link)
|
||||
ap->slave_link->lpm_policy = policy;
|
||||
|
||||
/* host config updated, enable DIPM if transitioning to MIN_POWER */
|
||||
ata_for_each_dev(dev, link, ENABLED) {
|
||||
if (policy == ATA_LPM_MIN_POWER && ata_id_has_dipm(dev->id)) {
|
||||
@ -3353,12 +3362,14 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
|
||||
}
|
||||
}
|
||||
|
||||
link->lpm_policy = policy;
|
||||
if (ap && ap->slave_link)
|
||||
ap->slave_link->lpm_policy = policy;
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
/* restore the old policy */
|
||||
link->lpm_policy = old_policy;
|
||||
if (ap && ap->slave_link)
|
||||
ap->slave_link->lpm_policy = old_policy;
|
||||
|
||||
/* if no device or only one more chance is left, disable LPM */
|
||||
if (!dev || ehc->tries[dev->devno] <= 2) {
|
||||
ata_link_printk(link, KERN_WARNING,
|
||||
|
@ -1532,11 +1532,10 @@ static unsigned int __ata_sff_port_intr(struct ata_port *ap,
|
||||
if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR))
|
||||
return ata_sff_idle_irq(ap);
|
||||
break;
|
||||
case HSM_ST:
|
||||
case HSM_ST_LAST:
|
||||
break;
|
||||
default:
|
||||
case HSM_ST_IDLE:
|
||||
return ata_sff_idle_irq(ap);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* check main status, clearing INTRQ if needed */
|
||||
|
@ -37,10 +37,22 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/libata.h>
|
||||
#include <scsi/scsi_host.h>
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
#include <asm/msr.h>
|
||||
static int use_msr;
|
||||
module_param_named(msr, use_msr, int, 0644);
|
||||
MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)");
|
||||
#else
|
||||
#undef rdmsr /* avoid accidental MSR usage on, e.g. x86-64 */
|
||||
#undef wrmsr
|
||||
#define rdmsr(x, y, z) do { } while (0)
|
||||
#define wrmsr(x, y, z) do { } while (0)
|
||||
#define use_msr 0
|
||||
#endif
|
||||
|
||||
#define DRV_NAME "pata_cs5536"
|
||||
#define DRV_VERSION "0.0.7"
|
||||
#define DRV_VERSION "0.0.8"
|
||||
|
||||
enum {
|
||||
CFG = 0,
|
||||
@ -75,8 +87,6 @@ enum {
|
||||
IDE_ETC_NODMA = 0x03,
|
||||
};
|
||||
|
||||
static int use_msr;
|
||||
|
||||
static const u32 msr_reg[4] = {
|
||||
MSR_IDE_CFG, MSR_IDE_DTC, MSR_IDE_CAST, MSR_IDE_ETC,
|
||||
};
|
||||
@ -88,7 +98,7 @@ static const u8 pci_reg[4] = {
|
||||
static inline int cs5536_read(struct pci_dev *pdev, int reg, u32 *val)
|
||||
{
|
||||
if (unlikely(use_msr)) {
|
||||
u32 dummy;
|
||||
u32 dummy __maybe_unused;
|
||||
|
||||
rdmsr(msr_reg[reg], *val, dummy);
|
||||
return 0;
|
||||
@ -294,8 +304,6 @@ MODULE_DESCRIPTION("low-level driver for the CS5536 IDE controller");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DEVICE_TABLE(pci, cs5536);
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
module_param_named(msr, use_msr, int, 0644);
|
||||
MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)");
|
||||
|
||||
module_init(cs5536_init);
|
||||
module_exit(cs5536_exit);
|
||||
|
@ -311,8 +311,10 @@ static void hci_uart_tty_close(struct tty_struct *tty)
|
||||
|
||||
if (test_and_clear_bit(HCI_UART_PROTO_SET, &hu->flags)) {
|
||||
hu->proto->close(hu);
|
||||
hci_unregister_dev(hdev);
|
||||
hci_free_dev(hdev);
|
||||
if (hdev) {
|
||||
hci_unregister_dev(hdev);
|
||||
hci_free_dev(hdev);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1192,12 +1192,19 @@ static void i9xx_chipset_flush(void)
|
||||
writel(1, intel_private.i9xx_flush_page);
|
||||
}
|
||||
|
||||
static void i965_write_entry(dma_addr_t addr, unsigned int entry,
|
||||
static void i965_write_entry(dma_addr_t addr,
|
||||
unsigned int entry,
|
||||
unsigned int flags)
|
||||
{
|
||||
u32 pte_flags;
|
||||
|
||||
pte_flags = I810_PTE_VALID;
|
||||
if (flags == AGP_USER_CACHED_MEMORY)
|
||||
pte_flags |= I830_PTE_SYSTEM_CACHED;
|
||||
|
||||
/* Shift high bits down */
|
||||
addr |= (addr >> 28) & 0xf0;
|
||||
writel(addr | I810_PTE_VALID, intel_private.gtt + entry);
|
||||
writel(addr | pte_flags, intel_private.gtt + entry);
|
||||
}
|
||||
|
||||
static bool gen6_check_flags(unsigned int flags)
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include <linux/ramoops.h>
|
||||
|
||||
#define RAMOOPS_KERNMSG_HDR "===="
|
||||
#define RAMOOPS_HEADER_SIZE (5 + sizeof(struct timeval))
|
||||
|
||||
#define RECORD_SIZE 4096
|
||||
|
||||
@ -65,8 +64,8 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
|
||||
struct ramoops_context, dump);
|
||||
unsigned long s1_start, s2_start;
|
||||
unsigned long l1_cpy, l2_cpy;
|
||||
int res;
|
||||
char *buf;
|
||||
int res, hdr_size;
|
||||
char *buf, *buf_orig;
|
||||
struct timeval timestamp;
|
||||
|
||||
/* Only dump oopses if dump_oops is set */
|
||||
@ -74,6 +73,8 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
|
||||
return;
|
||||
|
||||
buf = (char *)(cxt->virt_addr + (cxt->count * RECORD_SIZE));
|
||||
buf_orig = buf;
|
||||
|
||||
memset(buf, '\0', RECORD_SIZE);
|
||||
res = sprintf(buf, "%s", RAMOOPS_KERNMSG_HDR);
|
||||
buf += res;
|
||||
@ -81,8 +82,9 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
|
||||
res = sprintf(buf, "%lu.%lu\n", (long)timestamp.tv_sec, (long)timestamp.tv_usec);
|
||||
buf += res;
|
||||
|
||||
l2_cpy = min(l2, (unsigned long)(RECORD_SIZE - RAMOOPS_HEADER_SIZE));
|
||||
l1_cpy = min(l1, (unsigned long)(RECORD_SIZE - RAMOOPS_HEADER_SIZE) - l2_cpy);
|
||||
hdr_size = buf - buf_orig;
|
||||
l2_cpy = min(l2, (unsigned long)(RECORD_SIZE - hdr_size));
|
||||
l1_cpy = min(l1, (unsigned long)(RECORD_SIZE - hdr_size) - l2_cpy);
|
||||
|
||||
s2_start = l2 - l2_cpy;
|
||||
s1_start = l1 - l1_cpy;
|
||||
|
@ -56,15 +56,26 @@ static struct cs5535_gpio_chip {
|
||||
* registers, see include/linux/cs5535.h.
|
||||
*/
|
||||
|
||||
static void errata_outl(u32 val, unsigned long addr)
|
||||
static void errata_outl(struct cs5535_gpio_chip *chip, u32 val,
|
||||
unsigned int reg)
|
||||
{
|
||||
unsigned long addr = chip->base + 0x80 + reg;
|
||||
|
||||
/*
|
||||
* According to the CS5536 errata (#36), after suspend
|
||||
* a write to the high bank GPIO register will clear all
|
||||
* non-selected bits; the recommended workaround is a
|
||||
* read-modify-write operation.
|
||||
*
|
||||
* Don't apply this errata to the edge status GPIOs, as writing
|
||||
* to their lower bits will clear them.
|
||||
*/
|
||||
val |= inl(addr);
|
||||
if (reg != GPIO_POSITIVE_EDGE_STS && reg != GPIO_NEGATIVE_EDGE_STS) {
|
||||
if (val & 0xffff)
|
||||
val |= (inl(addr) & 0xffff); /* ignore the high bits */
|
||||
else
|
||||
val |= (inl(addr) ^ (val >> 16));
|
||||
}
|
||||
outl(val, addr);
|
||||
}
|
||||
|
||||
@ -76,7 +87,7 @@ static void __cs5535_gpio_set(struct cs5535_gpio_chip *chip, unsigned offset,
|
||||
outl(1 << offset, chip->base + reg);
|
||||
else
|
||||
/* high bank register */
|
||||
errata_outl(1 << (offset - 16), chip->base + 0x80 + reg);
|
||||
errata_outl(chip, 1 << (offset - 16), reg);
|
||||
}
|
||||
|
||||
void cs5535_gpio_set(unsigned offset, unsigned int reg)
|
||||
@ -98,7 +109,7 @@ static void __cs5535_gpio_clear(struct cs5535_gpio_chip *chip, unsigned offset,
|
||||
outl(1 << (offset + 16), chip->base + reg);
|
||||
else
|
||||
/* high bank register */
|
||||
errata_outl(1 << offset, chip->base + 0x80 + reg);
|
||||
errata_outl(chip, 1 << offset, reg);
|
||||
}
|
||||
|
||||
void cs5535_gpio_clear(unsigned offset, unsigned int reg)
|
||||
|
@ -1281,6 +1281,9 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
|
||||
err = gpio_direction_output(gpio,
|
||||
(flags & GPIOF_INIT_HIGH) ? 1 : 0);
|
||||
|
||||
if (err)
|
||||
gpio_free(gpio);
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gpio_request_one);
|
||||
|
@ -135,7 +135,7 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)
|
||||
struct rdc321x_gpio *rdc321x_gpio_dev;
|
||||
struct rdc321x_gpio_pdata *pdata;
|
||||
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata = platform_get_drvdata(pdev);
|
||||
if (!pdata) {
|
||||
dev_err(&pdev->dev, "no platform data supplied\n");
|
||||
return -ENODEV;
|
||||
|
@ -241,7 +241,7 @@ void drm_helper_disable_unused_functions(struct drm_device *dev)
|
||||
}
|
||||
|
||||
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
|
||||
if (encoder->crtc && !drm_helper_encoder_in_use(encoder)) {
|
||||
if (!drm_helper_encoder_in_use(encoder)) {
|
||||
drm_encoder_disable(encoder);
|
||||
/* disconnector encoder from any connector */
|
||||
encoder->crtc = NULL;
|
||||
@ -874,7 +874,10 @@ static void output_poll_execute(struct work_struct *work)
|
||||
continue;
|
||||
|
||||
connector->status = connector->funcs->detect(connector, false);
|
||||
DRM_DEBUG_KMS("connector status updated to %d\n", connector->status);
|
||||
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %d to %d\n",
|
||||
connector->base.id,
|
||||
drm_get_connector_name(connector),
|
||||
old_status, connector->status);
|
||||
if (old_status != connector->status)
|
||||
changed = true;
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ parse_general_features(struct drm_i915_private *dev_priv,
|
||||
general->ssc_freq ? 66 : 48;
|
||||
else if (IS_GEN5(dev) || IS_GEN6(dev))
|
||||
dev_priv->lvds_ssc_freq =
|
||||
general->ssc_freq ? 100 : 120;
|
||||
general->ssc_freq ? 120 : 100;
|
||||
else
|
||||
dev_priv->lvds_ssc_freq =
|
||||
general->ssc_freq ? 100 : 96;
|
||||
|
@ -479,6 +479,7 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
|
||||
uint16_t address = algo_data->address;
|
||||
uint8_t msg[5];
|
||||
uint8_t reply[2];
|
||||
unsigned retry;
|
||||
int msg_bytes;
|
||||
int reply_bytes;
|
||||
int ret;
|
||||
@ -513,14 +514,33 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
|
||||
break;
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
ret = intel_dp_aux_ch(intel_dp,
|
||||
msg, msg_bytes,
|
||||
reply, reply_bytes);
|
||||
for (retry = 0; retry < 5; retry++) {
|
||||
ret = intel_dp_aux_ch(intel_dp,
|
||||
msg, msg_bytes,
|
||||
reply, reply_bytes);
|
||||
if (ret < 0) {
|
||||
DRM_DEBUG_KMS("aux_ch failed %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
switch (reply[0] & AUX_NATIVE_REPLY_MASK) {
|
||||
case AUX_NATIVE_REPLY_ACK:
|
||||
/* I2C-over-AUX Reply field is only valid
|
||||
* when paired with AUX ACK.
|
||||
*/
|
||||
break;
|
||||
case AUX_NATIVE_REPLY_NACK:
|
||||
DRM_DEBUG_KMS("aux_ch native nack\n");
|
||||
return -EREMOTEIO;
|
||||
case AUX_NATIVE_REPLY_DEFER:
|
||||
udelay(100);
|
||||
continue;
|
||||
default:
|
||||
DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
|
||||
reply[0]);
|
||||
return -EREMOTEIO;
|
||||
}
|
||||
|
||||
switch (reply[0] & AUX_I2C_REPLY_MASK) {
|
||||
case AUX_I2C_REPLY_ACK:
|
||||
if (mode == MODE_I2C_READ) {
|
||||
@ -528,17 +548,20 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,
|
||||
}
|
||||
return reply_bytes - 1;
|
||||
case AUX_I2C_REPLY_NACK:
|
||||
DRM_DEBUG_KMS("aux_ch nack\n");
|
||||
DRM_DEBUG_KMS("aux_i2c nack\n");
|
||||
return -EREMOTEIO;
|
||||
case AUX_I2C_REPLY_DEFER:
|
||||
DRM_DEBUG_KMS("aux_ch defer\n");
|
||||
DRM_DEBUG_KMS("aux_i2c defer\n");
|
||||
udelay(100);
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("aux_ch invalid reply 0x%02x\n", reply[0]);
|
||||
DRM_ERROR("aux_i2c invalid reply 0x%02x\n", reply[0]);
|
||||
return -EREMOTEIO;
|
||||
}
|
||||
}
|
||||
|
||||
DRM_ERROR("too many retries, giving up\n");
|
||||
return -EREMOTEIO;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -696,20 +696,17 @@ int intel_wait_ring_buffer(struct drm_device *dev,
|
||||
drm_i915_private_t *dev_priv = dev->dev_private;
|
||||
u32 head;
|
||||
|
||||
head = intel_read_status_page(ring, 4);
|
||||
if (head) {
|
||||
ring->head = head & HEAD_ADDR;
|
||||
ring->space = ring->head - (ring->tail + 8);
|
||||
if (ring->space < 0)
|
||||
ring->space += ring->size;
|
||||
if (ring->space >= n)
|
||||
return 0;
|
||||
}
|
||||
|
||||
trace_i915_ring_wait_begin (dev);
|
||||
end = jiffies + 3 * HZ;
|
||||
do {
|
||||
ring->head = I915_READ_HEAD(ring) & HEAD_ADDR;
|
||||
/* If the reported head position has wrapped or hasn't advanced,
|
||||
* fallback to the slow and accurate path.
|
||||
*/
|
||||
head = intel_read_status_page(ring, 4);
|
||||
if (head < ring->actual_head)
|
||||
head = I915_READ_HEAD(ring);
|
||||
ring->actual_head = head;
|
||||
ring->head = head & HEAD_ADDR;
|
||||
ring->space = ring->head - (ring->tail + 8);
|
||||
if (ring->space < 0)
|
||||
ring->space += ring->size;
|
||||
|
@ -30,8 +30,9 @@ struct intel_ring_buffer {
|
||||
struct drm_device *dev;
|
||||
struct drm_gem_object *gem_object;
|
||||
|
||||
unsigned int head;
|
||||
unsigned int tail;
|
||||
u32 actual_head;
|
||||
u32 head;
|
||||
u32 tail;
|
||||
int space;
|
||||
struct intel_hw_status_page status_page;
|
||||
|
||||
|
@ -1908,9 +1908,12 @@ intel_sdvo_select_i2c_bus(struct drm_i915_private *dev_priv,
|
||||
speed = mapping->i2c_speed;
|
||||
}
|
||||
|
||||
sdvo->i2c = &dev_priv->gmbus[pin].adapter;
|
||||
intel_gmbus_set_speed(sdvo->i2c, speed);
|
||||
intel_gmbus_force_bit(sdvo->i2c, true);
|
||||
if (pin < GMBUS_NUM_PORTS) {
|
||||
sdvo->i2c = &dev_priv->gmbus[pin].adapter;
|
||||
intel_gmbus_set_speed(sdvo->i2c, speed);
|
||||
intel_gmbus_force_bit(sdvo->i2c, true);
|
||||
} else
|
||||
sdvo->i2c = &dev_priv->gmbus[GMBUS_PORT_DPB].adapter;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
@ -253,7 +253,8 @@ void atombios_crtc_dpms(struct drm_crtc *crtc, int mode)
|
||||
case DRM_MODE_DPMS_SUSPEND:
|
||||
case DRM_MODE_DPMS_OFF:
|
||||
drm_vblank_pre_modeset(dev, radeon_crtc->crtc_id);
|
||||
atombios_blank_crtc(crtc, ATOM_ENABLE);
|
||||
if (radeon_crtc->enabled)
|
||||
atombios_blank_crtc(crtc, ATOM_ENABLE);
|
||||
if (ASIC_IS_DCE3(rdev))
|
||||
atombios_enable_crtc_memreq(crtc, ATOM_DISABLE);
|
||||
atombios_enable_crtc(crtc, ATOM_DISABLE);
|
||||
@ -530,7 +531,7 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
|
||||
dp_clock = dig_connector->dp_clock;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0 /* doesn't work properly on some laptops */
|
||||
/* use recommended ref_div for ss */
|
||||
if (radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT)) {
|
||||
if (ss_enabled) {
|
||||
@ -540,7 +541,7 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
if (ASIC_IS_AVIVO(rdev)) {
|
||||
/* DVO wants 2x pixel clock if the DVO chip is in 12 bit mode */
|
||||
if (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1)
|
||||
|
@ -748,6 +748,8 @@ void evergreen_pcie_gart_tlb_flush(struct radeon_device *rdev)
|
||||
unsigned i;
|
||||
u32 tmp;
|
||||
|
||||
WREG32(HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1);
|
||||
|
||||
WREG32(VM_CONTEXT0_REQUEST_RESPONSE, REQUEST_TYPE(1));
|
||||
for (i = 0; i < rdev->usec_timeout; i++) {
|
||||
/* read MC_STATUS */
|
||||
@ -1922,7 +1924,6 @@ bool evergreen_gpu_is_lockup(struct radeon_device *rdev)
|
||||
static int evergreen_gpu_soft_reset(struct radeon_device *rdev)
|
||||
{
|
||||
struct evergreen_mc_save save;
|
||||
u32 srbm_reset = 0;
|
||||
u32 grbm_reset = 0;
|
||||
|
||||
dev_info(rdev->dev, "GPU softreset \n");
|
||||
@ -1961,16 +1962,6 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev)
|
||||
udelay(50);
|
||||
WREG32(GRBM_SOFT_RESET, 0);
|
||||
(void)RREG32(GRBM_SOFT_RESET);
|
||||
|
||||
/* reset all the system blocks */
|
||||
srbm_reset = SRBM_SOFT_RESET_ALL_MASK;
|
||||
|
||||
dev_info(rdev->dev, " SRBM_SOFT_RESET=0x%08X\n", srbm_reset);
|
||||
WREG32(SRBM_SOFT_RESET, srbm_reset);
|
||||
(void)RREG32(SRBM_SOFT_RESET);
|
||||
udelay(50);
|
||||
WREG32(SRBM_SOFT_RESET, 0);
|
||||
(void)RREG32(SRBM_SOFT_RESET);
|
||||
/* Wait a little for things to settle down */
|
||||
udelay(50);
|
||||
dev_info(rdev->dev, " GRBM_STATUS=0x%08X\n",
|
||||
@ -1981,10 +1972,6 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev)
|
||||
RREG32(GRBM_STATUS_SE1));
|
||||
dev_info(rdev->dev, " SRBM_STATUS=0x%08X\n",
|
||||
RREG32(SRBM_STATUS));
|
||||
/* After reset we need to reinit the asic as GPU often endup in an
|
||||
* incoherent state.
|
||||
*/
|
||||
atom_asic_init(rdev->mode_info.atom_context);
|
||||
evergreen_mc_resume(rdev, &save);
|
||||
return 0;
|
||||
}
|
||||
@ -2596,6 +2583,11 @@ int evergreen_resume(struct radeon_device *rdev)
|
||||
{
|
||||
int r;
|
||||
|
||||
/* reset the asic, the gfx blocks are often in a bad state
|
||||
* after the driver is unloaded or after a resume
|
||||
*/
|
||||
if (radeon_asic_reset(rdev))
|
||||
dev_warn(rdev->dev, "GPU reset failed !\n");
|
||||
/* Do not reset GPU before posting, on rv770 hw unlike on r500 hw,
|
||||
* posting will perform necessary task to bring back GPU into good
|
||||
* shape.
|
||||
@ -2712,6 +2704,11 @@ int evergreen_init(struct radeon_device *rdev)
|
||||
r = radeon_atombios_init(rdev);
|
||||
if (r)
|
||||
return r;
|
||||
/* reset the asic, the gfx blocks are often in a bad state
|
||||
* after the driver is unloaded or after a resume
|
||||
*/
|
||||
if (radeon_asic_reset(rdev))
|
||||
dev_warn(rdev->dev, "GPU reset failed !\n");
|
||||
/* Post card if necessary */
|
||||
if (!evergreen_card_posted(rdev)) {
|
||||
if (!rdev->bios) {
|
||||
|
@ -174,6 +174,7 @@
|
||||
#define HDP_NONSURFACE_BASE 0x2C04
|
||||
#define HDP_NONSURFACE_INFO 0x2C08
|
||||
#define HDP_NONSURFACE_SIZE 0x2C0C
|
||||
#define HDP_MEM_COHERENCY_FLUSH_CNTL 0x5480
|
||||
#define HDP_REG_COHERENCY_FLUSH_CNTL 0x54A0
|
||||
#define HDP_TILING_CONFIG 0x2F3C
|
||||
|
||||
|
@ -1342,13 +1342,19 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev)
|
||||
u32 srbm_status;
|
||||
u32 grbm_status;
|
||||
u32 grbm_status2;
|
||||
struct r100_gpu_lockup *lockup;
|
||||
int r;
|
||||
|
||||
if (rdev->family >= CHIP_RV770)
|
||||
lockup = &rdev->config.rv770.lockup;
|
||||
else
|
||||
lockup = &rdev->config.r600.lockup;
|
||||
|
||||
srbm_status = RREG32(R_000E50_SRBM_STATUS);
|
||||
grbm_status = RREG32(R_008010_GRBM_STATUS);
|
||||
grbm_status2 = RREG32(R_008014_GRBM_STATUS2);
|
||||
if (!G_008010_GUI_ACTIVE(grbm_status)) {
|
||||
r100_gpu_lockup_update(&rdev->config.r300.lockup, &rdev->cp);
|
||||
r100_gpu_lockup_update(lockup, &rdev->cp);
|
||||
return false;
|
||||
}
|
||||
/* force CP activities */
|
||||
@ -1360,7 +1366,7 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev)
|
||||
radeon_ring_unlock_commit(rdev);
|
||||
}
|
||||
rdev->cp.rptr = RREG32(R600_CP_RB_RPTR);
|
||||
return r100_gpu_cp_is_lockup(rdev, &rdev->config.r300.lockup, &rdev->cp);
|
||||
return r100_gpu_cp_is_lockup(rdev, lockup, &rdev->cp);
|
||||
}
|
||||
|
||||
int r600_asic_reset(struct radeon_device *rdev)
|
||||
|
@ -315,11 +315,10 @@ static inline int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
|
||||
if (array_mode == V_0280A0_ARRAY_LINEAR_GENERAL) {
|
||||
/* the initial DDX does bad things with the CB size occasionally */
|
||||
/* it rounds up height too far for slice tile max but the BO is smaller */
|
||||
tmp = (height - 7) * 8 * bpe;
|
||||
if ((tmp + track->cb_color_bo_offset[i]) > radeon_bo_size(track->cb_color_bo[i])) {
|
||||
dev_warn(p->dev, "%s offset[%d] %d %d %lu too big\n", __func__, i, track->cb_color_bo_offset[i], tmp, radeon_bo_size(track->cb_color_bo[i]));
|
||||
return -EINVAL;
|
||||
}
|
||||
/* r600c,g also seem to flush at bad times in some apps resulting in
|
||||
* bogus values here. So for linear just allow anything to avoid breaking
|
||||
* broken userspace.
|
||||
*/
|
||||
} else {
|
||||
dev_warn(p->dev, "%s offset[%d] %d %d %lu too big\n", __func__, i, track->cb_color_bo_offset[i], tmp, radeon_bo_size(track->cb_color_bo[i]));
|
||||
return -EINVAL;
|
||||
|
@ -910,11 +910,6 @@ int radeon_resume_kms(struct drm_device *dev)
|
||||
radeon_pm_resume(rdev);
|
||||
radeon_restore_bios_scratch_regs(rdev);
|
||||
|
||||
/* turn on display hw */
|
||||
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
|
||||
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
|
||||
}
|
||||
|
||||
radeon_fbdev_set_suspend(rdev, 0);
|
||||
release_console_sem();
|
||||
|
||||
@ -922,6 +917,10 @@ int radeon_resume_kms(struct drm_device *dev)
|
||||
radeon_hpd_init(rdev);
|
||||
/* blat the mode back in */
|
||||
drm_helper_resume_force_mode(dev);
|
||||
/* turn on display hw */
|
||||
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
|
||||
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -232,9 +232,28 @@ static struct drm_driver driver_old = {
|
||||
|
||||
static struct drm_driver kms_driver;
|
||||
|
||||
static void radeon_kick_out_firmware_fb(struct pci_dev *pdev)
|
||||
{
|
||||
struct apertures_struct *ap;
|
||||
bool primary = false;
|
||||
|
||||
ap = alloc_apertures(1);
|
||||
ap->ranges[0].base = pci_resource_start(pdev, 0);
|
||||
ap->ranges[0].size = pci_resource_len(pdev, 0);
|
||||
|
||||
#ifdef CONFIG_X86
|
||||
primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW;
|
||||
#endif
|
||||
remove_conflicting_framebuffers(ap, "radeondrmfb", primary);
|
||||
kfree(ap);
|
||||
}
|
||||
|
||||
static int __devinit
|
||||
radeon_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
{
|
||||
/* Get rid of things like offb */
|
||||
radeon_kick_out_firmware_fb(pdev);
|
||||
|
||||
return drm_get_pci_dev(pdev, ent, &kms_driver);
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ static int radeonfb_create(struct radeon_fbdev *rfbdev,
|
||||
goto out_unref;
|
||||
}
|
||||
info->apertures->ranges[0].base = rdev->ddev->mode_config.fb_base;
|
||||
info->apertures->ranges[0].size = rdev->mc.real_vram_size;
|
||||
info->apertures->ranges[0].size = rdev->mc.aper_size;
|
||||
|
||||
info->fix.mmio_start = 0;
|
||||
info->fix.mmio_len = 0;
|
||||
|
@ -267,7 +267,7 @@ void led_blink_set(struct led_classdev *led_cdev,
|
||||
unsigned long *delay_off)
|
||||
{
|
||||
if (led_cdev->blink_set &&
|
||||
led_cdev->blink_set(led_cdev, delay_on, delay_off))
|
||||
!led_cdev->blink_set(led_cdev, delay_on, delay_off))
|
||||
return;
|
||||
|
||||
/* blink with 1 Hz as default if nothing specified */
|
||||
|
@ -26,8 +26,8 @@ static struct ir_scancode rc6_mce[] = {
|
||||
|
||||
{ 0x800f040a, KEY_DELETE },
|
||||
{ 0x800f040b, KEY_ENTER },
|
||||
{ 0x800f040c, KEY_POWER },
|
||||
{ 0x800f040d, KEY_PROG1 }, /* Windows MCE button */
|
||||
{ 0x800f040c, KEY_POWER }, /* PC Power */
|
||||
{ 0x800f040d, KEY_PROG1 }, /* Windows MCE button */
|
||||
{ 0x800f040e, KEY_MUTE },
|
||||
{ 0x800f040f, KEY_INFO },
|
||||
|
||||
@ -56,31 +56,32 @@ static struct ir_scancode rc6_mce[] = {
|
||||
{ 0x800f0422, KEY_OK },
|
||||
{ 0x800f0423, KEY_EXIT },
|
||||
{ 0x800f0424, KEY_DVD },
|
||||
{ 0x800f0425, KEY_TUNER }, /* LiveTV */
|
||||
{ 0x800f0426, KEY_EPG }, /* Guide */
|
||||
{ 0x800f0427, KEY_ZOOM }, /* Aspect */
|
||||
{ 0x800f0425, KEY_TUNER }, /* LiveTV */
|
||||
{ 0x800f0426, KEY_EPG }, /* Guide */
|
||||
{ 0x800f0427, KEY_ZOOM }, /* Aspect */
|
||||
|
||||
{ 0x800f043a, KEY_BRIGHTNESSUP },
|
||||
|
||||
{ 0x800f0446, KEY_TV },
|
||||
{ 0x800f0447, KEY_AUDIO }, /* My Music */
|
||||
{ 0x800f0448, KEY_PVR }, /* RecordedTV */
|
||||
{ 0x800f0447, KEY_AUDIO }, /* My Music */
|
||||
{ 0x800f0448, KEY_PVR }, /* RecordedTV */
|
||||
{ 0x800f0449, KEY_CAMERA },
|
||||
{ 0x800f044a, KEY_VIDEO },
|
||||
{ 0x800f044c, KEY_LANGUAGE },
|
||||
{ 0x800f044d, KEY_TITLE },
|
||||
{ 0x800f044e, KEY_PRINT }, /* Print - HP OEM version of remote */
|
||||
{ 0x800f044e, KEY_PRINT }, /* Print - HP OEM version of remote */
|
||||
|
||||
{ 0x800f0450, KEY_RADIO },
|
||||
|
||||
{ 0x800f045a, KEY_SUBTITLE }, /* Caption/Teletext */
|
||||
{ 0x800f045a, KEY_SUBTITLE }, /* Caption/Teletext */
|
||||
{ 0x800f045b, KEY_RED },
|
||||
{ 0x800f045c, KEY_GREEN },
|
||||
{ 0x800f045d, KEY_YELLOW },
|
||||
{ 0x800f045e, KEY_BLUE },
|
||||
|
||||
{ 0x800f0465, KEY_POWER2 }, /* TV Power */
|
||||
{ 0x800f046e, KEY_PLAYPAUSE },
|
||||
{ 0x800f046f, KEY_MEDIA }, /* Start media application (NEW) */
|
||||
{ 0x800f046f, KEY_MEDIA }, /* Start media application (NEW) */
|
||||
|
||||
{ 0x800f0480, KEY_BRIGHTNESSDOWN },
|
||||
{ 0x800f0481, KEY_PLAYPAUSE },
|
||||
|
@ -522,10 +522,8 @@ unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait)
|
||||
|
||||
dev_dbg(ir->d.dev, LOGHEAD "poll called\n", ir->d.name, ir->d.minor);
|
||||
|
||||
if (!ir->attached) {
|
||||
mutex_unlock(&ir->irctl_lock);
|
||||
if (!ir->attached)
|
||||
return POLLERR;
|
||||
}
|
||||
|
||||
poll_wait(file, &ir->buf->wait_poll, wait);
|
||||
|
||||
@ -649,18 +647,18 @@ ssize_t lirc_dev_fop_read(struct file *file,
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
if (mutex_lock_interruptible(&ir->irctl_lock))
|
||||
return -ERESTARTSYS;
|
||||
if (mutex_lock_interruptible(&ir->irctl_lock)) {
|
||||
ret = -ERESTARTSYS;
|
||||
goto out_unlocked;
|
||||
}
|
||||
if (!ir->attached) {
|
||||
mutex_unlock(&ir->irctl_lock);
|
||||
return -ENODEV;
|
||||
ret = -ENODEV;
|
||||
goto out_locked;
|
||||
}
|
||||
|
||||
if (length % ir->chunk_size) {
|
||||
dev_dbg(ir->d.dev, LOGHEAD "read result = -EINVAL\n",
|
||||
ir->d.name, ir->d.minor);
|
||||
mutex_unlock(&ir->irctl_lock);
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto out_locked;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -711,18 +709,23 @@ ssize_t lirc_dev_fop_read(struct file *file,
|
||||
lirc_buffer_read(ir->buf, buf);
|
||||
ret = copy_to_user((void *)buffer+written, buf,
|
||||
ir->buf->chunk_size);
|
||||
written += ir->buf->chunk_size;
|
||||
if (!ret)
|
||||
written += ir->buf->chunk_size;
|
||||
else
|
||||
ret = -EFAULT;
|
||||
}
|
||||
}
|
||||
|
||||
remove_wait_queue(&ir->buf->wait_poll, &wait);
|
||||
set_current_state(TASK_RUNNING);
|
||||
|
||||
out_locked:
|
||||
mutex_unlock(&ir->irctl_lock);
|
||||
|
||||
out_unlocked:
|
||||
kfree(buf);
|
||||
dev_dbg(ir->d.dev, LOGHEAD "read result = %s (%d)\n",
|
||||
ir->d.name, ir->d.minor, ret ? "-EFAULT" : "OK", ret);
|
||||
ir->d.name, ir->d.minor, ret ? "<fail>" : "<ok>", ret);
|
||||
|
||||
return ret ? ret : written;
|
||||
}
|
||||
|
@ -35,10 +35,10 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/usb/input.h>
|
||||
#include <media/ir-core.h>
|
||||
#include <media/ir-common.h>
|
||||
|
||||
#define DRIVER_VERSION "1.91"
|
||||
#define DRIVER_AUTHOR "Jarod Wilson <jarod@wilsonet.com>"
|
||||
@ -49,6 +49,7 @@
|
||||
#define USB_BUFLEN 32 /* USB reception buffer length */
|
||||
#define USB_CTRL_MSG_SZ 2 /* Size of usb ctrl msg on gen1 hw */
|
||||
#define MCE_G1_INIT_MSGS 40 /* Init messages on gen1 hw to throw out */
|
||||
#define MS_TO_NS(msec) ((msec) * 1000)
|
||||
|
||||
/* MCE constants */
|
||||
#define MCE_CMDBUF_SIZE 384 /* MCE Command buffer length */
|
||||
@ -74,6 +75,7 @@
|
||||
#define MCE_PACKET_LENGTH_MASK 0x1f /* Packet length mask */
|
||||
|
||||
/* Sub-commands, which follow MCE_COMMAND_HEADER or MCE_HW_CMD_HEADER */
|
||||
#define MCE_CMD_SIG_END 0x01 /* End of signal */
|
||||
#define MCE_CMD_PING 0x03 /* Ping device */
|
||||
#define MCE_CMD_UNKNOWN 0x04 /* Unknown */
|
||||
#define MCE_CMD_UNKNOWN2 0x05 /* Unknown */
|
||||
@ -91,6 +93,7 @@
|
||||
#define MCE_CMD_G_TXMASK 0x13 /* Set TX port bitmask */
|
||||
#define MCE_CMD_S_RXSENSOR 0x14 /* Set RX sensor (std/learning) */
|
||||
#define MCE_CMD_G_RXSENSOR 0x15 /* Get RX sensor (std/learning) */
|
||||
#define MCE_RSP_PULSE_COUNT 0x15 /* RX pulse count (only if learning) */
|
||||
#define MCE_CMD_TX_PORTS 0x16 /* Get number of TX ports */
|
||||
#define MCE_CMD_G_WAKESRC 0x17 /* Get wake source */
|
||||
#define MCE_CMD_UNKNOWN7 0x18 /* Unknown */
|
||||
@ -146,14 +149,16 @@ enum mceusb_model_type {
|
||||
MCE_GEN3,
|
||||
MCE_GEN2_TX_INV,
|
||||
POLARIS_EVK,
|
||||
CX_HYBRID_TV,
|
||||
};
|
||||
|
||||
struct mceusb_model {
|
||||
u32 mce_gen1:1;
|
||||
u32 mce_gen2:1;
|
||||
u32 mce_gen3:1;
|
||||
u32 tx_mask_inverted:1;
|
||||
u32 tx_mask_normal:1;
|
||||
u32 is_polaris:1;
|
||||
u32 no_tx:1;
|
||||
|
||||
const char *rc_map; /* Allow specify a per-board map */
|
||||
const char *name; /* per-board name */
|
||||
@ -162,18 +167,18 @@ struct mceusb_model {
|
||||
static const struct mceusb_model mceusb_model[] = {
|
||||
[MCE_GEN1] = {
|
||||
.mce_gen1 = 1,
|
||||
.tx_mask_inverted = 1,
|
||||
.tx_mask_normal = 1,
|
||||
},
|
||||
[MCE_GEN2] = {
|
||||
.mce_gen2 = 1,
|
||||
},
|
||||
[MCE_GEN2_TX_INV] = {
|
||||
.mce_gen2 = 1,
|
||||
.tx_mask_inverted = 1,
|
||||
.tx_mask_normal = 1,
|
||||
},
|
||||
[MCE_GEN3] = {
|
||||
.mce_gen3 = 1,
|
||||
.tx_mask_inverted = 1,
|
||||
.tx_mask_normal = 1,
|
||||
},
|
||||
[POLARIS_EVK] = {
|
||||
.is_polaris = 1,
|
||||
@ -183,7 +188,12 @@ static const struct mceusb_model mceusb_model[] = {
|
||||
* to allow testing it
|
||||
*/
|
||||
.rc_map = RC_MAP_RC5_HAUPPAUGE_NEW,
|
||||
.name = "cx231xx MCE IR",
|
||||
.name = "Conexant Hybrid TV (cx231xx) MCE IR",
|
||||
},
|
||||
[CX_HYBRID_TV] = {
|
||||
.is_polaris = 1,
|
||||
.no_tx = 1, /* tx isn't wired up at all */
|
||||
.name = "Conexant Hybrid TV (cx231xx) MCE IR",
|
||||
},
|
||||
};
|
||||
|
||||
@ -273,6 +283,8 @@ static struct usb_device_id mceusb_dev_table[] = {
|
||||
{ USB_DEVICE(VENDOR_FORMOSA, 0xe03c) },
|
||||
/* Formosa Industrial Computing */
|
||||
{ USB_DEVICE(VENDOR_FORMOSA, 0xe03e) },
|
||||
/* Fintek eHome Infrared Transceiver (HP branded) */
|
||||
{ USB_DEVICE(VENDOR_FINTEK, 0x5168) },
|
||||
/* Fintek eHome Infrared Transceiver */
|
||||
{ USB_DEVICE(VENDOR_FINTEK, 0x0602) },
|
||||
/* Fintek eHome Infrared Transceiver (in the AOpen MP45) */
|
||||
@ -292,9 +304,12 @@ static struct usb_device_id mceusb_dev_table[] = {
|
||||
{ USB_DEVICE(VENDOR_NORTHSTAR, 0xe004) },
|
||||
/* TiVo PC IR Receiver */
|
||||
{ USB_DEVICE(VENDOR_TIVO, 0x2000) },
|
||||
/* Conexant SDK */
|
||||
/* Conexant Hybrid TV "Shelby" Polaris SDK */
|
||||
{ USB_DEVICE(VENDOR_CONEXANT, 0x58a1),
|
||||
.driver_info = POLARIS_EVK },
|
||||
/* Conexant Hybrid TV RDU253S Polaris */
|
||||
{ USB_DEVICE(VENDOR_CONEXANT, 0x58a5),
|
||||
.driver_info = CX_HYBRID_TV },
|
||||
/* Terminating entry */
|
||||
{ }
|
||||
};
|
||||
@ -303,7 +318,10 @@ static struct usb_device_id mceusb_dev_table[] = {
|
||||
struct mceusb_dev {
|
||||
/* ir-core bits */
|
||||
struct ir_dev_props *props;
|
||||
struct ir_raw_event rawir;
|
||||
|
||||
/* optional features we can enable */
|
||||
bool carrier_report_enabled;
|
||||
bool learning_enabled;
|
||||
|
||||
/* core device bits */
|
||||
struct device *dev;
|
||||
@ -318,6 +336,8 @@ struct mceusb_dev {
|
||||
/* buffers and dma */
|
||||
unsigned char *buf_in;
|
||||
unsigned int len_in;
|
||||
dma_addr_t dma_in;
|
||||
dma_addr_t dma_out;
|
||||
|
||||
enum {
|
||||
CMD_HEADER = 0,
|
||||
@ -325,15 +345,14 @@ struct mceusb_dev {
|
||||
CMD_DATA,
|
||||
PARSE_IRDATA,
|
||||
} parser_state;
|
||||
u8 cmd, rem; /* Remaining IR data bytes in packet */
|
||||
|
||||
dma_addr_t dma_in;
|
||||
dma_addr_t dma_out;
|
||||
u8 cmd, rem; /* Remaining IR data bytes in packet */
|
||||
|
||||
struct {
|
||||
u32 connected:1;
|
||||
u32 tx_mask_inverted:1;
|
||||
u32 tx_mask_normal:1;
|
||||
u32 microsoft_gen1:1;
|
||||
u32 no_tx:1;
|
||||
} flags;
|
||||
|
||||
/* transmit support */
|
||||
@ -408,9 +427,10 @@ static int mceusb_cmdsize(u8 cmd, u8 subcmd)
|
||||
case MCE_CMD_UNKNOWN:
|
||||
case MCE_CMD_S_CARRIER:
|
||||
case MCE_CMD_S_TIMEOUT:
|
||||
case MCE_CMD_G_RXSENSOR:
|
||||
case MCE_RSP_PULSE_COUNT:
|
||||
datasize = 2;
|
||||
break;
|
||||
case MCE_CMD_SIG_END:
|
||||
case MCE_CMD_S_TXMASK:
|
||||
case MCE_CMD_S_RXSENSOR:
|
||||
datasize = 1;
|
||||
@ -433,7 +453,7 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf,
|
||||
return;
|
||||
|
||||
/* skip meaningless 0xb1 0x60 header bytes on orig receiver */
|
||||
if (ir->flags.microsoft_gen1 && !out)
|
||||
if (ir->flags.microsoft_gen1 && !out && !offset)
|
||||
skip = 2;
|
||||
|
||||
if (len <= skip)
|
||||
@ -491,6 +511,9 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf,
|
||||
break;
|
||||
case MCE_COMMAND_HEADER:
|
||||
switch (subcmd) {
|
||||
case MCE_CMD_SIG_END:
|
||||
dev_info(dev, "End of signal\n");
|
||||
break;
|
||||
case MCE_CMD_PING:
|
||||
dev_info(dev, "Ping\n");
|
||||
break;
|
||||
@ -525,10 +548,11 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf,
|
||||
inout, data1 == 0x02 ? "short" : "long");
|
||||
break;
|
||||
case MCE_CMD_G_RXSENSOR:
|
||||
if (len == 2)
|
||||
/* aka MCE_RSP_PULSE_COUNT */
|
||||
if (out)
|
||||
dev_info(dev, "Get receive sensor\n");
|
||||
else
|
||||
dev_info(dev, "Received pulse count is %d\n",
|
||||
else if (ir->learning_enabled)
|
||||
dev_info(dev, "RX pulse count: %d\n",
|
||||
((data1 << 8) | data2));
|
||||
break;
|
||||
case MCE_RSP_CMD_INVALID:
|
||||
@ -724,16 +748,16 @@ out:
|
||||
return ret ? ret : n;
|
||||
}
|
||||
|
||||
/* Sets active IR outputs -- mce devices typically (all?) have two */
|
||||
/* Sets active IR outputs -- mce devices typically have two */
|
||||
static int mceusb_set_tx_mask(void *priv, u32 mask)
|
||||
{
|
||||
struct mceusb_dev *ir = priv;
|
||||
|
||||
if (ir->flags.tx_mask_inverted)
|
||||
if (ir->flags.tx_mask_normal)
|
||||
ir->tx_mask = mask;
|
||||
else
|
||||
ir->tx_mask = (mask != MCE_DEFAULT_TX_MASK ?
|
||||
mask ^ MCE_DEFAULT_TX_MASK : mask) << 1;
|
||||
else
|
||||
ir->tx_mask = mask;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -752,7 +776,7 @@ static int mceusb_set_tx_carrier(void *priv, u32 carrier)
|
||||
|
||||
if (carrier == 0) {
|
||||
ir->carrier = carrier;
|
||||
cmdbuf[2] = 0x01;
|
||||
cmdbuf[2] = MCE_CMD_SIG_END;
|
||||
cmdbuf[3] = MCE_IRDATA_TRAILER;
|
||||
dev_dbg(ir->dev, "%s: disabling carrier "
|
||||
"modulation\n", __func__);
|
||||
@ -782,6 +806,34 @@ static int mceusb_set_tx_carrier(void *priv, u32 carrier)
|
||||
return carrier;
|
||||
}
|
||||
|
||||
/*
|
||||
* We don't do anything but print debug spew for many of the command bits
|
||||
* we receive from the hardware, but some of them are useful information
|
||||
* we want to store so that we can use them.
|
||||
*/
|
||||
static void mceusb_handle_command(struct mceusb_dev *ir, int index)
|
||||
{
|
||||
u8 hi = ir->buf_in[index + 1] & 0xff;
|
||||
u8 lo = ir->buf_in[index + 2] & 0xff;
|
||||
|
||||
switch (ir->buf_in[index]) {
|
||||
/* 2-byte return value commands */
|
||||
case MCE_CMD_S_TIMEOUT:
|
||||
ir->props->timeout = MS_TO_NS((hi << 8 | lo) / 2);
|
||||
break;
|
||||
|
||||
/* 1-byte return value commands */
|
||||
case MCE_CMD_S_TXMASK:
|
||||
ir->tx_mask = hi;
|
||||
break;
|
||||
case MCE_CMD_S_RXSENSOR:
|
||||
ir->learning_enabled = (hi == 0x02);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
|
||||
{
|
||||
DEFINE_IR_RAW_EVENT(rawir);
|
||||
@ -791,39 +843,30 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
|
||||
if (ir->flags.microsoft_gen1)
|
||||
i = 2;
|
||||
|
||||
/* if there's no data, just return now */
|
||||
if (buf_len <= i)
|
||||
return;
|
||||
|
||||
for (; i < buf_len; i++) {
|
||||
switch (ir->parser_state) {
|
||||
case SUBCMD:
|
||||
ir->rem = mceusb_cmdsize(ir->cmd, ir->buf_in[i]);
|
||||
mceusb_dev_printdata(ir, ir->buf_in, i - 1,
|
||||
ir->rem + 2, false);
|
||||
mceusb_handle_command(ir, i);
|
||||
ir->parser_state = CMD_DATA;
|
||||
break;
|
||||
case PARSE_IRDATA:
|
||||
ir->rem--;
|
||||
rawir.pulse = ((ir->buf_in[i] & MCE_PULSE_BIT) != 0);
|
||||
rawir.duration = (ir->buf_in[i] & MCE_PULSE_MASK)
|
||||
* MCE_TIME_UNIT * 1000;
|
||||
|
||||
if ((ir->buf_in[i] & MCE_PULSE_MASK) == 0x7f) {
|
||||
if (ir->rawir.pulse == rawir.pulse) {
|
||||
ir->rawir.duration += rawir.duration;
|
||||
} else {
|
||||
ir->rawir.duration = rawir.duration;
|
||||
ir->rawir.pulse = rawir.pulse;
|
||||
}
|
||||
if (ir->rem)
|
||||
break;
|
||||
}
|
||||
rawir.duration += ir->rawir.duration;
|
||||
ir->rawir.duration = 0;
|
||||
ir->rawir.pulse = rawir.pulse;
|
||||
* MS_TO_NS(MCE_TIME_UNIT);
|
||||
|
||||
dev_dbg(ir->dev, "Storing %s with duration %d\n",
|
||||
rawir.pulse ? "pulse" : "space",
|
||||
rawir.duration);
|
||||
|
||||
ir_raw_event_store(ir->idev, &rawir);
|
||||
ir_raw_event_store_with_filter(ir->idev, &rawir);
|
||||
break;
|
||||
case CMD_DATA:
|
||||
ir->rem--;
|
||||
@ -839,17 +882,10 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir, int buf_len)
|
||||
continue;
|
||||
}
|
||||
ir->rem = (ir->cmd & MCE_PACKET_LENGTH_MASK);
|
||||
mceusb_dev_printdata(ir, ir->buf_in, i, ir->rem + 1, false);
|
||||
if (ir->rem) {
|
||||
mceusb_dev_printdata(ir, ir->buf_in,
|
||||
i, ir->rem + 1, false);
|
||||
if (ir->rem)
|
||||
ir->parser_state = PARSE_IRDATA;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* a package with len=0 (e. g. 0x80) means end of
|
||||
* data. We could use it to do the call to
|
||||
* ir_raw_event_handle(). For now, we don't need to
|
||||
* use it.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
@ -984,9 +1020,11 @@ static void mceusb_get_parameters(struct mceusb_dev *ir)
|
||||
mce_async_out(ir, GET_CARRIER_FREQ, sizeof(GET_CARRIER_FREQ));
|
||||
mce_sync_in(ir, NULL, maxp);
|
||||
|
||||
/* get the transmitter bitmask */
|
||||
mce_async_out(ir, GET_TX_BITMASK, sizeof(GET_TX_BITMASK));
|
||||
mce_sync_in(ir, NULL, maxp);
|
||||
if (!ir->flags.no_tx) {
|
||||
/* get the transmitter bitmask */
|
||||
mce_async_out(ir, GET_TX_BITMASK, sizeof(GET_TX_BITMASK));
|
||||
mce_sync_in(ir, NULL, maxp);
|
||||
}
|
||||
|
||||
/* get receiver timeout value */
|
||||
mce_async_out(ir, GET_RX_TIMEOUT, sizeof(GET_RX_TIMEOUT));
|
||||
@ -1035,12 +1073,18 @@ static struct input_dev *mceusb_init_input_dev(struct mceusb_dev *ir)
|
||||
props->priv = ir;
|
||||
props->driver_type = RC_DRIVER_IR_RAW;
|
||||
props->allowed_protos = IR_TYPE_ALL;
|
||||
props->s_tx_mask = mceusb_set_tx_mask;
|
||||
props->s_tx_carrier = mceusb_set_tx_carrier;
|
||||
props->tx_ir = mceusb_tx_ir;
|
||||
props->timeout = MS_TO_NS(1000);
|
||||
if (!ir->flags.no_tx) {
|
||||
props->s_tx_mask = mceusb_set_tx_mask;
|
||||
props->s_tx_carrier = mceusb_set_tx_carrier;
|
||||
props->tx_ir = mceusb_tx_ir;
|
||||
}
|
||||
|
||||
ir->props = props;
|
||||
|
||||
usb_to_input_id(ir->usbdev, &idev->id);
|
||||
idev->dev.parent = ir->dev;
|
||||
|
||||
if (mceusb_model[ir->model].rc_map)
|
||||
rc_map = mceusb_model[ir->model].rc_map;
|
||||
|
||||
@ -1074,16 +1118,16 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
|
||||
enum mceusb_model_type model = id->driver_info;
|
||||
bool is_gen3;
|
||||
bool is_microsoft_gen1;
|
||||
bool tx_mask_inverted;
|
||||
bool tx_mask_normal;
|
||||
bool is_polaris;
|
||||
|
||||
dev_dbg(&intf->dev, ": %s called\n", __func__);
|
||||
dev_dbg(&intf->dev, "%s called\n", __func__);
|
||||
|
||||
idesc = intf->cur_altsetting;
|
||||
|
||||
is_gen3 = mceusb_model[model].mce_gen3;
|
||||
is_microsoft_gen1 = mceusb_model[model].mce_gen1;
|
||||
tx_mask_inverted = mceusb_model[model].tx_mask_inverted;
|
||||
tx_mask_normal = mceusb_model[model].tx_mask_normal;
|
||||
is_polaris = mceusb_model[model].is_polaris;
|
||||
|
||||
if (is_polaris) {
|
||||
@ -1107,7 +1151,7 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
|
||||
ep_in = ep;
|
||||
ep_in->bmAttributes = USB_ENDPOINT_XFER_INT;
|
||||
ep_in->bInterval = 1;
|
||||
dev_dbg(&intf->dev, ": acceptable inbound endpoint "
|
||||
dev_dbg(&intf->dev, "acceptable inbound endpoint "
|
||||
"found\n");
|
||||
}
|
||||
|
||||
@ -1122,12 +1166,12 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
|
||||
ep_out = ep;
|
||||
ep_out->bmAttributes = USB_ENDPOINT_XFER_INT;
|
||||
ep_out->bInterval = 1;
|
||||
dev_dbg(&intf->dev, ": acceptable outbound endpoint "
|
||||
dev_dbg(&intf->dev, "acceptable outbound endpoint "
|
||||
"found\n");
|
||||
}
|
||||
}
|
||||
if (ep_in == NULL) {
|
||||
dev_dbg(&intf->dev, ": inbound and/or endpoint not found\n");
|
||||
dev_dbg(&intf->dev, "inbound and/or endpoint not found\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
@ -1150,11 +1194,10 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
|
||||
ir->dev = &intf->dev;
|
||||
ir->len_in = maxp;
|
||||
ir->flags.microsoft_gen1 = is_microsoft_gen1;
|
||||
ir->flags.tx_mask_inverted = tx_mask_inverted;
|
||||
ir->flags.tx_mask_normal = tx_mask_normal;
|
||||
ir->flags.no_tx = mceusb_model[model].no_tx;
|
||||
ir->model = model;
|
||||
|
||||
init_ir_raw_event(&ir->rawir);
|
||||
|
||||
/* Saving usb interface data for use by the transmitter routine */
|
||||
ir->usb_ep_in = ep_in;
|
||||
ir->usb_ep_out = ep_out;
|
||||
@ -1191,7 +1234,8 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf,
|
||||
|
||||
mceusb_get_parameters(ir);
|
||||
|
||||
mceusb_set_tx_mask(ir, MCE_DEFAULT_TX_MASK);
|
||||
if (!ir->flags.no_tx)
|
||||
mceusb_set_tx_mask(ir, MCE_DEFAULT_TX_MASK);
|
||||
|
||||
usb_set_intfdata(intf, ir);
|
||||
|
||||
|
@ -603,6 +603,8 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
|
||||
count = nvt->pkts;
|
||||
nvt_dbg_verbose("Processing buffer of len %d", count);
|
||||
|
||||
init_ir_raw_event(&rawir);
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
nvt->pkts--;
|
||||
sample = nvt->buf[i];
|
||||
@ -643,11 +645,15 @@ static void nvt_process_rx_ir_data(struct nvt_dev *nvt)
|
||||
* indicates end of IR signal, but new data incoming. In both
|
||||
* cases, it means we're ready to call ir_raw_event_handle
|
||||
*/
|
||||
if (sample == BUF_PULSE_BIT || ((sample != BUF_LEN_MASK) &&
|
||||
(sample & BUF_REPEAT_MASK) == BUF_REPEAT_BYTE))
|
||||
if ((sample == BUF_PULSE_BIT) && nvt->pkts) {
|
||||
nvt_dbg("Calling ir_raw_event_handle (signal end)\n");
|
||||
ir_raw_event_handle(nvt->rdev);
|
||||
}
|
||||
}
|
||||
|
||||
nvt_dbg("Calling ir_raw_event_handle (buffer empty)\n");
|
||||
ir_raw_event_handle(nvt->rdev);
|
||||
|
||||
if (nvt->pkts) {
|
||||
nvt_dbg("Odd, pkts should be 0 now... (its %u)", nvt->pkts);
|
||||
nvt->pkts = 0;
|
||||
|
@ -34,8 +34,9 @@
|
||||
#include <linux/device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/usb/input.h>
|
||||
#include <media/ir-core.h>
|
||||
|
||||
#define DRIVER_VERSION "1.61"
|
||||
@ -140,7 +141,9 @@ static struct usb_driver streamzap_driver = {
|
||||
|
||||
static void sz_push(struct streamzap_ir *sz, struct ir_raw_event rawir)
|
||||
{
|
||||
ir_raw_event_store(sz->idev, &rawir);
|
||||
dev_dbg(sz->dev, "Storing %s with duration %u us\n",
|
||||
(rawir.pulse ? "pulse" : "space"), rawir.duration);
|
||||
ir_raw_event_store_with_filter(sz->idev, &rawir);
|
||||
}
|
||||
|
||||
static void sz_push_full_pulse(struct streamzap_ir *sz,
|
||||
@ -167,7 +170,6 @@ static void sz_push_full_pulse(struct streamzap_ir *sz,
|
||||
rawir.duration *= 1000;
|
||||
rawir.duration &= IR_MAX_DURATION;
|
||||
}
|
||||
dev_dbg(sz->dev, "ls %u\n", rawir.duration);
|
||||
sz_push(sz, rawir);
|
||||
|
||||
sz->idle = false;
|
||||
@ -180,7 +182,6 @@ static void sz_push_full_pulse(struct streamzap_ir *sz,
|
||||
sz->sum += rawir.duration;
|
||||
rawir.duration *= 1000;
|
||||
rawir.duration &= IR_MAX_DURATION;
|
||||
dev_dbg(sz->dev, "p %u\n", rawir.duration);
|
||||
sz_push(sz, rawir);
|
||||
}
|
||||
|
||||
@ -200,7 +201,6 @@ static void sz_push_full_space(struct streamzap_ir *sz,
|
||||
rawir.duration += SZ_RESOLUTION / 2;
|
||||
sz->sum += rawir.duration;
|
||||
rawir.duration *= 1000;
|
||||
dev_dbg(sz->dev, "s %u\n", rawir.duration);
|
||||
sz_push(sz, rawir);
|
||||
}
|
||||
|
||||
@ -221,8 +221,6 @@ static void streamzap_callback(struct urb *urb)
|
||||
struct streamzap_ir *sz;
|
||||
unsigned int i;
|
||||
int len;
|
||||
static int timeout = (((SZ_TIMEOUT * SZ_RESOLUTION * 1000) &
|
||||
IR_MAX_DURATION) | 0x03000000);
|
||||
|
||||
if (!urb)
|
||||
return;
|
||||
@ -246,7 +244,7 @@ static void streamzap_callback(struct urb *urb)
|
||||
|
||||
dev_dbg(sz->dev, "%s: received urb, len %d\n", __func__, len);
|
||||
for (i = 0; i < len; i++) {
|
||||
dev_dbg(sz->dev, "sz idx %d: %x\n",
|
||||
dev_dbg(sz->dev, "sz->buf_in[%d]: %x\n",
|
||||
i, (unsigned char)sz->buf_in[i]);
|
||||
switch (sz->decoder_state) {
|
||||
case PulseSpace:
|
||||
@ -273,7 +271,7 @@ static void streamzap_callback(struct urb *urb)
|
||||
DEFINE_IR_RAW_EVENT(rawir);
|
||||
|
||||
rawir.pulse = false;
|
||||
rawir.duration = timeout;
|
||||
rawir.duration = sz->props->timeout;
|
||||
sz->idle = true;
|
||||
if (sz->timeout_enabled)
|
||||
sz_push(sz, rawir);
|
||||
@ -335,6 +333,9 @@ static struct input_dev *streamzap_init_input_dev(struct streamzap_ir *sz)
|
||||
|
||||
sz->props = props;
|
||||
|
||||
usb_to_input_id(sz->usbdev, &idev->id);
|
||||
idev->dev.parent = sz->dev;
|
||||
|
||||
ret = ir_input_register(idev, RC_MAP_STREAMZAP, props, DRIVER_NAME);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "remote input device register failed\n");
|
||||
@ -444,6 +445,8 @@ static int __devinit streamzap_probe(struct usb_interface *intf,
|
||||
sz->decoder_state = PulseSpace;
|
||||
/* FIXME: don't yet have a way to set this */
|
||||
sz->timeout_enabled = true;
|
||||
sz->props->timeout = (((SZ_TIMEOUT * SZ_RESOLUTION * 1000) &
|
||||
IR_MAX_DURATION) | 0x03000000);
|
||||
#if 0
|
||||
/* not yet supported, depends on patches from maxim */
|
||||
/* see also: LIRC_GET_REC_RESOLUTION and LIRC_SET_REC_TIMEOUT */
|
||||
|
@ -807,8 +807,6 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd,
|
||||
|
||||
if (common_flags & SOCAM_PCLK_SAMPLE_RISING)
|
||||
csicr1 |= CSICR1_REDGE;
|
||||
if (common_flags & SOCAM_PCLK_SAMPLE_FALLING)
|
||||
csicr1 |= CSICR1_INV_PCLK;
|
||||
if (common_flags & SOCAM_VSYNC_ACTIVE_HIGH)
|
||||
csicr1 |= CSICR1_SOF_POL;
|
||||
if (common_flags & SOCAM_HSYNC_ACTIVE_HIGH)
|
||||
|
@ -522,6 +522,7 @@ static int fimc_cap_streamon(struct file *file, void *priv,
|
||||
INIT_LIST_HEAD(&fimc->vid_cap.active_buf_q);
|
||||
fimc->vid_cap.active_buf_cnt = 0;
|
||||
fimc->vid_cap.frame_count = 0;
|
||||
fimc->vid_cap.buf_index = fimc_hw_get_frame_index(fimc);
|
||||
|
||||
set_bit(ST_CAPT_PEND, &fimc->state);
|
||||
ret = videobuf_streamon(&fimc->vid_cap.vbq);
|
||||
@ -652,6 +653,50 @@ static int fimc_cap_s_ctrl(struct file *file, void *priv,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int fimc_cap_cropcap(struct file *file, void *fh,
|
||||
struct v4l2_cropcap *cr)
|
||||
{
|
||||
struct fimc_frame *f;
|
||||
struct fimc_ctx *ctx = fh;
|
||||
struct fimc_dev *fimc = ctx->fimc_dev;
|
||||
|
||||
if (cr->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
return -EINVAL;
|
||||
|
||||
if (mutex_lock_interruptible(&fimc->lock))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
f = &ctx->s_frame;
|
||||
cr->bounds.left = 0;
|
||||
cr->bounds.top = 0;
|
||||
cr->bounds.width = f->o_width;
|
||||
cr->bounds.height = f->o_height;
|
||||
cr->defrect = cr->bounds;
|
||||
|
||||
mutex_unlock(&fimc->lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fimc_cap_g_crop(struct file *file, void *fh, struct v4l2_crop *cr)
|
||||
{
|
||||
struct fimc_frame *f;
|
||||
struct fimc_ctx *ctx = file->private_data;
|
||||
struct fimc_dev *fimc = ctx->fimc_dev;
|
||||
|
||||
|
||||
if (mutex_lock_interruptible(&fimc->lock))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
f = &ctx->s_frame;
|
||||
cr->c.left = f->offs_h;
|
||||
cr->c.top = f->offs_v;
|
||||
cr->c.width = f->width;
|
||||
cr->c.height = f->height;
|
||||
|
||||
mutex_unlock(&fimc->lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fimc_cap_s_crop(struct file *file, void *fh,
|
||||
struct v4l2_crop *cr)
|
||||
{
|
||||
@ -716,9 +761,9 @@ static const struct v4l2_ioctl_ops fimc_capture_ioctl_ops = {
|
||||
.vidioc_g_ctrl = fimc_vidioc_g_ctrl,
|
||||
.vidioc_s_ctrl = fimc_cap_s_ctrl,
|
||||
|
||||
.vidioc_g_crop = fimc_vidioc_g_crop,
|
||||
.vidioc_g_crop = fimc_cap_g_crop,
|
||||
.vidioc_s_crop = fimc_cap_s_crop,
|
||||
.vidioc_cropcap = fimc_vidioc_cropcap,
|
||||
.vidioc_cropcap = fimc_cap_cropcap,
|
||||
|
||||
.vidioc_enum_input = fimc_cap_enum_input,
|
||||
.vidioc_s_input = fimc_cap_s_input,
|
||||
@ -785,7 +830,7 @@ int fimc_register_capture_device(struct fimc_dev *fimc)
|
||||
videobuf_queue_dma_contig_init(&vid_cap->vbq, &fimc_qops,
|
||||
vid_cap->v4l2_dev.dev, &fimc->irqlock,
|
||||
V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE,
|
||||
sizeof(struct fimc_vid_buffer), (void *)ctx);
|
||||
sizeof(struct fimc_vid_buffer), (void *)ctx, NULL);
|
||||
|
||||
ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1);
|
||||
if (ret) {
|
||||
|
@ -50,8 +50,8 @@ static struct fimc_fmt fimc_formats[] = {
|
||||
.planes_cnt = 1,
|
||||
.flags = FMT_FLAGS_M2M,
|
||||
}, {
|
||||
.name = "XRGB-8-8-8-8, 24 bpp",
|
||||
.fourcc = V4L2_PIX_FMT_RGB24,
|
||||
.name = "XRGB-8-8-8-8, 32 bpp",
|
||||
.fourcc = V4L2_PIX_FMT_RGB32,
|
||||
.depth = 32,
|
||||
.color = S5P_FIMC_RGB888,
|
||||
.buff_cnt = 1,
|
||||
@ -983,6 +983,7 @@ int fimc_vidioc_queryctrl(struct file *file, void *priv,
|
||||
{
|
||||
struct fimc_ctx *ctx = priv;
|
||||
struct v4l2_queryctrl *c;
|
||||
int ret = -EINVAL;
|
||||
|
||||
c = get_ctrl(qc->id);
|
||||
if (c) {
|
||||
@ -990,10 +991,14 @@ int fimc_vidioc_queryctrl(struct file *file, void *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ctx->state & FIMC_CTX_CAP)
|
||||
return v4l2_subdev_call(ctx->fimc_dev->vid_cap.sd,
|
||||
if (ctx->state & FIMC_CTX_CAP) {
|
||||
if (mutex_lock_interruptible(&ctx->fimc_dev->lock))
|
||||
return -ERESTARTSYS;
|
||||
ret = v4l2_subdev_call(ctx->fimc_dev->vid_cap.sd,
|
||||
core, queryctrl, qc);
|
||||
return -EINVAL;
|
||||
mutex_unlock(&ctx->fimc_dev->lock);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int fimc_vidioc_g_ctrl(struct file *file, void *priv,
|
||||
@ -1115,7 +1120,7 @@ static int fimc_m2m_s_ctrl(struct file *file, void *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fimc_vidioc_cropcap(struct file *file, void *fh,
|
||||
static int fimc_m2m_cropcap(struct file *file, void *fh,
|
||||
struct v4l2_cropcap *cr)
|
||||
{
|
||||
struct fimc_frame *frame;
|
||||
@ -1139,7 +1144,7 @@ int fimc_vidioc_cropcap(struct file *file, void *fh,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fimc_vidioc_g_crop(struct file *file, void *fh, struct v4l2_crop *cr)
|
||||
static int fimc_m2m_g_crop(struct file *file, void *fh, struct v4l2_crop *cr)
|
||||
{
|
||||
struct fimc_frame *frame;
|
||||
struct fimc_ctx *ctx = file->private_data;
|
||||
@ -1167,22 +1172,22 @@ int fimc_try_crop(struct fimc_ctx *ctx, struct v4l2_crop *cr)
|
||||
struct fimc_frame *f;
|
||||
u32 min_size, halign;
|
||||
|
||||
f = (cr->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) ?
|
||||
&ctx->s_frame : &ctx->d_frame;
|
||||
|
||||
if (cr->c.top < 0 || cr->c.left < 0) {
|
||||
v4l2_err(&fimc->m2m.v4l2_dev,
|
||||
"doesn't support negative values for top & left\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
f = ctx_get_frame(ctx, cr->type);
|
||||
if (IS_ERR(f))
|
||||
return PTR_ERR(f);
|
||||
if (cr->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
|
||||
f = (ctx->state & FIMC_CTX_CAP) ? &ctx->s_frame : &ctx->d_frame;
|
||||
else if (cr->type == V4L2_BUF_TYPE_VIDEO_OUTPUT &&
|
||||
ctx->state & FIMC_CTX_M2M)
|
||||
f = &ctx->s_frame;
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
min_size = (cr->type == V4L2_BUF_TYPE_VIDEO_OUTPUT)
|
||||
? fimc->variant->min_inp_pixsize
|
||||
: fimc->variant->min_out_pixsize;
|
||||
min_size = (f == &ctx->s_frame) ?
|
||||
fimc->variant->min_inp_pixsize : fimc->variant->min_out_pixsize;
|
||||
|
||||
if (ctx->state & FIMC_CTX_M2M) {
|
||||
if (fimc->id == 1 && fimc->variant->pix_hoff)
|
||||
@ -1233,6 +1238,9 @@ static int fimc_m2m_s_crop(struct file *file, void *fh, struct v4l2_crop *cr)
|
||||
f = (cr->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) ?
|
||||
&ctx->s_frame : &ctx->d_frame;
|
||||
|
||||
if (mutex_lock_interruptible(&fimc->lock))
|
||||
return -ERESTARTSYS;
|
||||
|
||||
spin_lock_irqsave(&ctx->slock, flags);
|
||||
if (~ctx->state & (FIMC_SRC_FMT | FIMC_DST_FMT)) {
|
||||
/* Check to see if scaling ratio is within supported range */
|
||||
@ -1241,9 +1249,9 @@ static int fimc_m2m_s_crop(struct file *file, void *fh, struct v4l2_crop *cr)
|
||||
else
|
||||
ret = fimc_check_scaler_ratio(&cr->c, &ctx->s_frame);
|
||||
if (ret) {
|
||||
spin_unlock_irqrestore(&ctx->slock, flags);
|
||||
v4l2_err(&fimc->m2m.v4l2_dev, "Out of scaler range");
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto scr_unlock;
|
||||
}
|
||||
}
|
||||
ctx->state |= FIMC_PARAMS;
|
||||
@ -1253,7 +1261,9 @@ static int fimc_m2m_s_crop(struct file *file, void *fh, struct v4l2_crop *cr)
|
||||
f->width = cr->c.width;
|
||||
f->height = cr->c.height;
|
||||
|
||||
scr_unlock:
|
||||
spin_unlock_irqrestore(&ctx->slock, flags);
|
||||
mutex_unlock(&fimc->lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1285,9 +1295,9 @@ static const struct v4l2_ioctl_ops fimc_m2m_ioctl_ops = {
|
||||
.vidioc_g_ctrl = fimc_vidioc_g_ctrl,
|
||||
.vidioc_s_ctrl = fimc_m2m_s_ctrl,
|
||||
|
||||
.vidioc_g_crop = fimc_vidioc_g_crop,
|
||||
.vidioc_g_crop = fimc_m2m_g_crop,
|
||||
.vidioc_s_crop = fimc_m2m_s_crop,
|
||||
.vidioc_cropcap = fimc_vidioc_cropcap
|
||||
.vidioc_cropcap = fimc_m2m_cropcap
|
||||
|
||||
};
|
||||
|
||||
@ -1396,7 +1406,7 @@ static const struct v4l2_file_operations fimc_m2m_fops = {
|
||||
.open = fimc_m2m_open,
|
||||
.release = fimc_m2m_release,
|
||||
.poll = fimc_m2m_poll,
|
||||
.ioctl = video_ioctl2,
|
||||
.unlocked_ioctl = video_ioctl2,
|
||||
.mmap = fimc_m2m_mmap,
|
||||
};
|
||||
|
||||
@ -1736,6 +1746,7 @@ static struct samsung_fimc_variant fimc0_variant_s5pv310 = {
|
||||
.pix_hoff = 1,
|
||||
.has_inp_rot = 1,
|
||||
.has_out_rot = 1,
|
||||
.has_cistatus2 = 1,
|
||||
.min_inp_pixsize = 16,
|
||||
.min_out_pixsize = 16,
|
||||
.hor_offs_align = 1,
|
||||
@ -1745,6 +1756,7 @@ static struct samsung_fimc_variant fimc0_variant_s5pv310 = {
|
||||
|
||||
static struct samsung_fimc_variant fimc2_variant_s5pv310 = {
|
||||
.pix_hoff = 1,
|
||||
.has_cistatus2 = 1,
|
||||
.min_inp_pixsize = 16,
|
||||
.min_out_pixsize = 16,
|
||||
.hor_offs_align = 1,
|
||||
|
@ -13,13 +13,15 @@
|
||||
|
||||
/*#define DEBUG*/
|
||||
|
||||
#include <linux/sched.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/videodev2.h>
|
||||
#include <media/videobuf-core.h>
|
||||
#include <media/v4l2-device.h>
|
||||
#include <media/v4l2-mem2mem.h>
|
||||
#include <media/v4l2-mediabus.h>
|
||||
#include <media/s3c_fimc.h>
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#include "regs-fimc.h"
|
||||
|
||||
#define err(fmt, args...) \
|
||||
@ -369,6 +371,7 @@ struct fimc_pix_limit {
|
||||
* @pix_hoff: indicate whether horizontal offset is in pixels or in bytes
|
||||
* @has_inp_rot: set if has input rotator
|
||||
* @has_out_rot: set if has output rotator
|
||||
* @has_cistatus2: 1 if CISTATUS2 register is present in this IP revision
|
||||
* @pix_limit: pixel size constraints for the scaler
|
||||
* @min_inp_pixsize: minimum input pixel size
|
||||
* @min_out_pixsize: minimum output pixel size
|
||||
@ -379,6 +382,7 @@ struct samsung_fimc_variant {
|
||||
unsigned int pix_hoff:1;
|
||||
unsigned int has_inp_rot:1;
|
||||
unsigned int has_out_rot:1;
|
||||
unsigned int has_cistatus2:1;
|
||||
struct fimc_pix_limit *pix_limit;
|
||||
u16 min_inp_pixsize;
|
||||
u16 min_out_pixsize;
|
||||
@ -554,11 +558,19 @@ static inline struct fimc_frame *ctx_get_frame(struct fimc_ctx *ctx,
|
||||
return frame;
|
||||
}
|
||||
|
||||
/* Return an index to the buffer actually being written. */
|
||||
static inline u32 fimc_hw_get_frame_index(struct fimc_dev *dev)
|
||||
{
|
||||
u32 reg = readl(dev->regs + S5P_CISTATUS);
|
||||
return (reg & S5P_CISTATUS_FRAMECNT_MASK) >>
|
||||
S5P_CISTATUS_FRAMECNT_SHIFT;
|
||||
u32 reg;
|
||||
|
||||
if (dev->variant->has_cistatus2) {
|
||||
reg = readl(dev->regs + S5P_CISTATUS2) & 0x3F;
|
||||
return reg > 0 ? --reg : reg;
|
||||
} else {
|
||||
reg = readl(dev->regs + S5P_CISTATUS);
|
||||
return (reg & S5P_CISTATUS_FRAMECNT_MASK) >>
|
||||
S5P_CISTATUS_FRAMECNT_SHIFT;
|
||||
}
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------*/
|
||||
@ -594,10 +606,6 @@ int fimc_vidioc_g_fmt(struct file *file, void *priv,
|
||||
struct v4l2_format *f);
|
||||
int fimc_vidioc_try_fmt(struct file *file, void *priv,
|
||||
struct v4l2_format *f);
|
||||
int fimc_vidioc_g_crop(struct file *file, void *fh,
|
||||
struct v4l2_crop *cr);
|
||||
int fimc_vidioc_cropcap(struct file *file, void *fh,
|
||||
struct v4l2_cropcap *cr);
|
||||
int fimc_vidioc_queryctrl(struct file *file, void *priv,
|
||||
struct v4l2_queryctrl *qc);
|
||||
int fimc_vidioc_g_ctrl(struct file *file, void *priv,
|
||||
|
@ -165,6 +165,9 @@
|
||||
#define S5P_CISTATUS_VVALID_A (1 << 15)
|
||||
#define S5P_CISTATUS_VVALID_B (1 << 14)
|
||||
|
||||
/* Indexes to the last and the currently processed buffer. */
|
||||
#define S5P_CISTATUS2 0x68
|
||||
|
||||
/* Image capture control */
|
||||
#define S5P_CIIMGCPT 0xc0
|
||||
#define S5P_CIIMGCPT_IMGCPTEN (1 << 31)
|
||||
|
@ -1980,7 +1980,7 @@ static int __devinit sh_mobile_ceu_probe(struct platform_device *pdev)
|
||||
* we complete the completion.
|
||||
*/
|
||||
|
||||
if (!csi2->driver || !csi2->driver->owner) {
|
||||
if (!csi2->driver) {
|
||||
complete(&wait.completion);
|
||||
/* Either too late, or probing failed */
|
||||
bus_unregister_notifier(&platform_bus_type, &wait.notifier);
|
||||
|
@ -405,13 +405,13 @@ static int soc_camera_open(struct file *file)
|
||||
ret = soc_camera_set_fmt(icd, &f);
|
||||
if (ret < 0)
|
||||
goto esfmt;
|
||||
|
||||
ici->ops->init_videobuf(&icd->vb_vidq, icd);
|
||||
}
|
||||
|
||||
file->private_data = icd;
|
||||
dev_dbg(&icd->dev, "camera device open\n");
|
||||
|
||||
ici->ops->init_videobuf(&icd->vb_vidq, icd);
|
||||
|
||||
mutex_unlock(&icd->video_lock);
|
||||
|
||||
return 0;
|
||||
|
@ -303,7 +303,7 @@ static irqreturn_t ab8500_irq(int irq, void *dev)
|
||||
continue;
|
||||
|
||||
do {
|
||||
int bit = __ffs(status);
|
||||
int bit = __ffs(value);
|
||||
int line = i * 8 + bit;
|
||||
|
||||
handle_nested_irq(ab8500->irq_base + line);
|
||||
|
@ -1455,7 +1455,11 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
|
||||
dev_err(wm831x->dev, "Failed to read parent ID: %d\n", ret);
|
||||
goto err;
|
||||
}
|
||||
if (ret != 0x6204) {
|
||||
switch (ret) {
|
||||
case 0x6204:
|
||||
case 0x6246:
|
||||
break;
|
||||
default:
|
||||
dev_err(wm831x->dev, "Device is not a WM831x: ID %x\n", ret);
|
||||
ret = -EINVAL;
|
||||
goto err;
|
||||
@ -1620,7 +1624,7 @@ int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
|
||||
case WM8325:
|
||||
ret = mfd_add_devices(wm831x->dev, -1,
|
||||
wm8320_devs, ARRAY_SIZE(wm8320_devs),
|
||||
NULL, 0);
|
||||
NULL, wm831x->irq_base);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -1773,6 +1773,7 @@ int mmc_pm_notify(struct notifier_block *notify_block,
|
||||
|
||||
case PM_POST_SUSPEND:
|
||||
case PM_POST_HIBERNATION:
|
||||
case PM_POST_RESTORE:
|
||||
|
||||
spin_lock_irqsave(&host->lock, flags);
|
||||
host->rescan_disable = 0;
|
||||
|
@ -69,6 +69,7 @@
|
||||
#include <linux/highmem.h>
|
||||
|
||||
#include <linux/mmc/host.h>
|
||||
#include <linux/mmc/sdio.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
@ -493,10 +494,14 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command
|
||||
else if (data->flags & MMC_DATA_WRITE)
|
||||
cmdr |= AT91_MCI_TRCMD_START;
|
||||
|
||||
if (data->flags & MMC_DATA_STREAM)
|
||||
cmdr |= AT91_MCI_TRTYP_STREAM;
|
||||
if (data->blocks > 1)
|
||||
cmdr |= AT91_MCI_TRTYP_MULTIPLE;
|
||||
if (cmd->opcode == SD_IO_RW_EXTENDED) {
|
||||
cmdr |= AT91_MCI_TRTYP_SDIO_BLOCK;
|
||||
} else {
|
||||
if (data->flags & MMC_DATA_STREAM)
|
||||
cmdr |= AT91_MCI_TRTYP_STREAM;
|
||||
if (data->blocks > 1)
|
||||
cmdr |= AT91_MCI_TRTYP_MULTIPLE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
block_length = 0;
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <linux/stat.h>
|
||||
|
||||
#include <linux/mmc/host.h>
|
||||
#include <linux/mmc/sdio.h>
|
||||
|
||||
#include <mach/atmel-mci.h>
|
||||
#include <linux/atmel-mci.h>
|
||||
@ -532,12 +533,17 @@ static u32 atmci_prepare_command(struct mmc_host *mmc,
|
||||
data = cmd->data;
|
||||
if (data) {
|
||||
cmdr |= MCI_CMDR_START_XFER;
|
||||
if (data->flags & MMC_DATA_STREAM)
|
||||
cmdr |= MCI_CMDR_STREAM;
|
||||
else if (data->blocks > 1)
|
||||
cmdr |= MCI_CMDR_MULTI_BLOCK;
|
||||
else
|
||||
cmdr |= MCI_CMDR_BLOCK;
|
||||
|
||||
if (cmd->opcode == SD_IO_RW_EXTENDED) {
|
||||
cmdr |= MCI_CMDR_SDIO_BLOCK;
|
||||
} else {
|
||||
if (data->flags & MMC_DATA_STREAM)
|
||||
cmdr |= MCI_CMDR_STREAM;
|
||||
else if (data->blocks > 1)
|
||||
cmdr |= MCI_CMDR_MULTI_BLOCK;
|
||||
else
|
||||
cmdr |= MCI_CMDR_BLOCK;
|
||||
}
|
||||
|
||||
if (data->flags & MMC_DATA_READ)
|
||||
cmdr |= MCI_CMDR_TRDIR_READ;
|
||||
|
@ -702,6 +702,7 @@ static int __devinit atl1c_sw_init(struct atl1c_adapter *adapter)
|
||||
|
||||
|
||||
adapter->wol = 0;
|
||||
device_set_wakeup_enable(&pdev->dev, false);
|
||||
adapter->link_speed = SPEED_0;
|
||||
adapter->link_duplex = FULL_DUPLEX;
|
||||
adapter->num_rx_queues = AT_DEF_RECEIVE_QUEUE;
|
||||
@ -2444,8 +2445,9 @@ static int atl1c_close(struct net_device *netdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int atl1c_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
static int atl1c_suspend(struct device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct atl1c_adapter *adapter = netdev_priv(netdev);
|
||||
struct atl1c_hw *hw = &adapter->hw;
|
||||
@ -2454,7 +2456,6 @@ static int atl1c_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
u32 wol_ctrl_data = 0;
|
||||
u16 mii_intr_status_data = 0;
|
||||
u32 wufc = adapter->wol;
|
||||
int retval = 0;
|
||||
|
||||
atl1c_disable_l0s_l1(hw);
|
||||
if (netif_running(netdev)) {
|
||||
@ -2462,9 +2463,6 @@ static int atl1c_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
atl1c_down(adapter);
|
||||
}
|
||||
netif_device_detach(netdev);
|
||||
retval = pci_save_state(pdev);
|
||||
if (retval)
|
||||
return retval;
|
||||
|
||||
if (wufc)
|
||||
if (atl1c_phy_power_saving(hw) != 0)
|
||||
@ -2525,12 +2523,8 @@ static int atl1c_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
AT_WRITE_REG(hw, REG_WOL_CTRL, wol_ctrl_data);
|
||||
AT_WRITE_REG(hw, REG_MAC_CTRL, mac_ctrl_data);
|
||||
|
||||
/* pcie patch */
|
||||
device_set_wakeup_enable(&pdev->dev, 1);
|
||||
|
||||
AT_WRITE_REG(hw, REG_GPHY_CTRL, GPHY_CTRL_DEFAULT |
|
||||
GPHY_CTRL_EXT_RESET);
|
||||
pci_prepare_to_sleep(pdev);
|
||||
} else {
|
||||
AT_WRITE_REG(hw, REG_GPHY_CTRL, GPHY_CTRL_POWER_SAVING);
|
||||
master_ctrl_data |= MASTER_CTRL_CLK_SEL_DIS;
|
||||
@ -2540,25 +2534,17 @@ static int atl1c_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
AT_WRITE_REG(hw, REG_MAC_CTRL, mac_ctrl_data);
|
||||
AT_WRITE_REG(hw, REG_WOL_CTRL, 0);
|
||||
hw->phy_configured = false; /* re-init PHY when resume */
|
||||
pci_enable_wake(pdev, pci_choose_state(pdev, state), 0);
|
||||
}
|
||||
|
||||
pci_disable_device(pdev);
|
||||
pci_set_power_state(pdev, pci_choose_state(pdev, state));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int atl1c_resume(struct pci_dev *pdev)
|
||||
static int atl1c_resume(struct device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct atl1c_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
pci_enable_wake(pdev, PCI_D3hot, 0);
|
||||
pci_enable_wake(pdev, PCI_D3cold, 0);
|
||||
|
||||
AT_WRITE_REG(&adapter->hw, REG_WOL_CTRL, 0);
|
||||
atl1c_reset_pcie(&adapter->hw, ATL1C_PCIE_L0S_L1_DISABLE |
|
||||
ATL1C_PCIE_PHY_RESET);
|
||||
@ -2582,7 +2568,12 @@ static int atl1c_resume(struct pci_dev *pdev)
|
||||
|
||||
static void atl1c_shutdown(struct pci_dev *pdev)
|
||||
{
|
||||
atl1c_suspend(pdev, PMSG_SUSPEND);
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct atl1c_adapter *adapter = netdev_priv(netdev);
|
||||
|
||||
atl1c_suspend(&pdev->dev);
|
||||
pci_wake_from_d3(pdev, adapter->wol);
|
||||
pci_set_power_state(pdev, PCI_D3hot);
|
||||
}
|
||||
|
||||
static const struct net_device_ops atl1c_netdev_ops = {
|
||||
@ -2886,16 +2877,16 @@ static struct pci_error_handlers atl1c_err_handler = {
|
||||
.resume = atl1c_io_resume,
|
||||
};
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(atl1c_pm_ops, atl1c_suspend, atl1c_resume);
|
||||
|
||||
static struct pci_driver atl1c_driver = {
|
||||
.name = atl1c_driver_name,
|
||||
.id_table = atl1c_pci_tbl,
|
||||
.probe = atl1c_probe,
|
||||
.remove = __devexit_p(atl1c_remove),
|
||||
/* Power Managment Hooks */
|
||||
.suspend = atl1c_suspend,
|
||||
.resume = atl1c_resume,
|
||||
.shutdown = atl1c_shutdown,
|
||||
.err_handler = &atl1c_err_handler
|
||||
.err_handler = &atl1c_err_handler,
|
||||
.driver.pm = &atl1c_pm_ops,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -234,7 +234,7 @@ struct be_adapter {
|
||||
u8 __iomem *db; /* Door Bell */
|
||||
u8 __iomem *pcicfg; /* PCI config space */
|
||||
|
||||
spinlock_t mbox_lock; /* For serializing mbox cmds to BE card */
|
||||
struct mutex mbox_lock; /* For serializing mbox cmds to BE card */
|
||||
struct be_dma_mem mbox_mem;
|
||||
/* Mbox mem is adjusted to align to 16 bytes. The allocated addr
|
||||
* is stored for freeing purpose */
|
||||
|
@ -462,7 +462,8 @@ int be_cmd_fw_init(struct be_adapter *adapter)
|
||||
u8 *wrb;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = (u8 *)wrb_from_mbox(adapter);
|
||||
*wrb++ = 0xFF;
|
||||
@ -476,7 +477,7 @@ int be_cmd_fw_init(struct be_adapter *adapter)
|
||||
|
||||
status = be_mbox_notify_wait(adapter);
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -491,7 +492,8 @@ int be_cmd_fw_clean(struct be_adapter *adapter)
|
||||
if (adapter->eeh_err)
|
||||
return -EIO;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = (u8 *)wrb_from_mbox(adapter);
|
||||
*wrb++ = 0xFF;
|
||||
@ -505,7 +507,7 @@ int be_cmd_fw_clean(struct be_adapter *adapter)
|
||||
|
||||
status = be_mbox_notify_wait(adapter);
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
return status;
|
||||
}
|
||||
int be_cmd_eq_create(struct be_adapter *adapter,
|
||||
@ -516,7 +518,8 @@ int be_cmd_eq_create(struct be_adapter *adapter,
|
||||
struct be_dma_mem *q_mem = &eq->dma_mem;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -546,7 +549,7 @@ int be_cmd_eq_create(struct be_adapter *adapter,
|
||||
eq->created = true;
|
||||
}
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -558,7 +561,8 @@ int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
|
||||
struct be_cmd_req_mac_query *req;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -583,7 +587,7 @@ int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
|
||||
memcpy(mac_addr, resp->mac.addr, ETH_ALEN);
|
||||
}
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -667,7 +671,8 @@ int be_cmd_cq_create(struct be_adapter *adapter,
|
||||
void *ctxt;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -701,7 +706,7 @@ int be_cmd_cq_create(struct be_adapter *adapter,
|
||||
cq->created = true;
|
||||
}
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -724,7 +729,8 @@ int be_cmd_mccq_create(struct be_adapter *adapter,
|
||||
void *ctxt;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -754,7 +760,7 @@ int be_cmd_mccq_create(struct be_adapter *adapter,
|
||||
mccq->id = le16_to_cpu(resp->id);
|
||||
mccq->created = true;
|
||||
}
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -769,7 +775,8 @@ int be_cmd_txq_create(struct be_adapter *adapter,
|
||||
void *ctxt;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -801,7 +808,7 @@ int be_cmd_txq_create(struct be_adapter *adapter,
|
||||
txq->created = true;
|
||||
}
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -816,7 +823,8 @@ int be_cmd_rxq_create(struct be_adapter *adapter,
|
||||
struct be_dma_mem *q_mem = &rxq->dma_mem;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -843,7 +851,7 @@ int be_cmd_rxq_create(struct be_adapter *adapter,
|
||||
*rss_id = resp->rss_id;
|
||||
}
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -862,7 +870,8 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
|
||||
if (adapter->eeh_err)
|
||||
return -EIO;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -899,7 +908,7 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
|
||||
|
||||
status = be_mbox_notify_wait(adapter);
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -915,7 +924,8 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags,
|
||||
struct be_cmd_req_if_create *req;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -941,7 +951,7 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags,
|
||||
*pmac_id = le32_to_cpu(resp->pmac_id);
|
||||
}
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -955,7 +965,8 @@ int be_cmd_if_destroy(struct be_adapter *adapter, u32 interface_id)
|
||||
if (adapter->eeh_err)
|
||||
return -EIO;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -970,7 +981,7 @@ int be_cmd_if_destroy(struct be_adapter *adapter, u32 interface_id)
|
||||
|
||||
status = be_mbox_notify_wait(adapter);
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
|
||||
return status;
|
||||
}
|
||||
@ -1060,7 +1071,8 @@ int be_cmd_get_fw_ver(struct be_adapter *adapter, char *fw_ver)
|
||||
struct be_cmd_req_get_fw_version *req;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -1077,7 +1089,7 @@ int be_cmd_get_fw_ver(struct be_adapter *adapter, char *fw_ver)
|
||||
strncpy(fw_ver, resp->firmware_version_string, FW_VER_LEN);
|
||||
}
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -1322,7 +1334,8 @@ int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num,
|
||||
struct be_cmd_req_query_fw_cfg *req;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -1341,7 +1354,7 @@ int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num,
|
||||
*caps = le32_to_cpu(resp->function_caps);
|
||||
}
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -1352,7 +1365,8 @@ int be_cmd_reset_function(struct be_adapter *adapter)
|
||||
struct be_cmd_req_hdr *req;
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -1365,7 +1379,7 @@ int be_cmd_reset_function(struct be_adapter *adapter)
|
||||
|
||||
status = be_mbox_notify_wait(adapter);
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -1376,7 +1390,8 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
|
||||
u32 myhash[10];
|
||||
int status;
|
||||
|
||||
spin_lock(&adapter->mbox_lock);
|
||||
if (mutex_lock_interruptible(&adapter->mbox_lock))
|
||||
return -1;
|
||||
|
||||
wrb = wrb_from_mbox(adapter);
|
||||
req = embedded_payload(wrb);
|
||||
@ -1396,7 +1411,7 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
|
||||
|
||||
status = be_mbox_notify_wait(adapter);
|
||||
|
||||
spin_unlock(&adapter->mbox_lock);
|
||||
mutex_unlock(&adapter->mbox_lock);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -2677,7 +2677,7 @@ static int be_ctrl_init(struct be_adapter *adapter)
|
||||
}
|
||||
memset(mc_cmd_mem->va, 0, mc_cmd_mem->size);
|
||||
|
||||
spin_lock_init(&adapter->mbox_lock);
|
||||
mutex_init(&adapter->mbox_lock);
|
||||
spin_lock_init(&adapter->mcc_lock);
|
||||
spin_lock_init(&adapter->mcc_cq_lock);
|
||||
|
||||
|
@ -88,7 +88,12 @@ static void bond_na_send(struct net_device *slave_dev,
|
||||
}
|
||||
|
||||
if (vlan_id) {
|
||||
skb = vlan_put_tag(skb, vlan_id);
|
||||
/* The Ethernet header is not present yet, so it is
|
||||
* too early to insert a VLAN tag. Force use of an
|
||||
* out-of-line tag here and let dev_hard_start_xmit()
|
||||
* insert it if the slave hardware can't.
|
||||
*/
|
||||
skb = __vlan_hwaccel_put_tag(skb, vlan_id);
|
||||
if (!skb) {
|
||||
pr_err("failed to insert VLAN tag\n");
|
||||
return;
|
||||
|
@ -418,36 +418,11 @@ struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr)
|
||||
* @bond: bond device that got this skb for tx.
|
||||
* @skb: hw accel VLAN tagged skb to transmit
|
||||
* @slave_dev: slave that is supposed to xmit this skbuff
|
||||
*
|
||||
* When the bond gets an skb to transmit that is
|
||||
* already hardware accelerated VLAN tagged, and it
|
||||
* needs to relay this skb to a slave that is not
|
||||
* hw accel capable, the skb needs to be "unaccelerated",
|
||||
* i.e. strip the hwaccel tag and re-insert it as part
|
||||
* of the payload.
|
||||
*/
|
||||
int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb,
|
||||
struct net_device *slave_dev)
|
||||
{
|
||||
unsigned short uninitialized_var(vlan_id);
|
||||
|
||||
/* Test vlan_list not vlgrp to catch and handle 802.1p tags */
|
||||
if (!list_empty(&bond->vlan_list) &&
|
||||
!(slave_dev->features & NETIF_F_HW_VLAN_TX) &&
|
||||
vlan_get_tag(skb, &vlan_id) == 0) {
|
||||
skb->dev = slave_dev;
|
||||
skb = vlan_put_tag(skb, vlan_id);
|
||||
if (!skb) {
|
||||
/* vlan_put_tag() frees the skb in case of error,
|
||||
* so return success here so the calling functions
|
||||
* won't attempt to free is again.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
skb->dev = slave_dev;
|
||||
}
|
||||
|
||||
skb->dev = slave_dev;
|
||||
skb->priority = 1;
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
if (unlikely(bond->dev->priv_flags & IFF_IN_NETPOLL)) {
|
||||
@ -1203,11 +1178,13 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
|
||||
bond_do_fail_over_mac(bond, new_active,
|
||||
old_active);
|
||||
|
||||
bond->send_grat_arp = bond->params.num_grat_arp;
|
||||
bond_send_gratuitous_arp(bond);
|
||||
if (netif_running(bond->dev)) {
|
||||
bond->send_grat_arp = bond->params.num_grat_arp;
|
||||
bond_send_gratuitous_arp(bond);
|
||||
|
||||
bond->send_unsol_na = bond->params.num_unsol_na;
|
||||
bond_send_unsolicited_na(bond);
|
||||
bond->send_unsol_na = bond->params.num_unsol_na;
|
||||
bond_send_unsolicited_na(bond);
|
||||
}
|
||||
|
||||
write_unlock_bh(&bond->curr_slave_lock);
|
||||
read_unlock(&bond->lock);
|
||||
@ -1221,8 +1198,9 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
|
||||
|
||||
/* resend IGMP joins since active slave has changed or
|
||||
* all were sent on curr_active_slave */
|
||||
if ((USES_PRIMARY(bond->params.mode) && new_active) ||
|
||||
bond->params.mode == BOND_MODE_ROUNDROBIN) {
|
||||
if (((USES_PRIMARY(bond->params.mode) && new_active) ||
|
||||
bond->params.mode == BOND_MODE_ROUNDROBIN) &&
|
||||
netif_running(bond->dev)) {
|
||||
bond->igmp_retrans = bond->params.resend_igmp;
|
||||
queue_delayed_work(bond->wq, &bond->mcast_work, 0);
|
||||
}
|
||||
|
@ -269,11 +269,11 @@ static inline struct slave *bond_get_slave_by_dev(struct bonding *bond, struct n
|
||||
|
||||
bond_for_each_slave(bond, slave, i) {
|
||||
if (slave->dev == slave_dev) {
|
||||
break;
|
||||
return slave;
|
||||
}
|
||||
}
|
||||
|
||||
return slave;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)
|
||||
|
@ -935,7 +935,7 @@ static void epic_init_ring(struct net_device *dev)
|
||||
|
||||
/* Fill in the Rx buffers. Handle allocation failure gracefully. */
|
||||
for (i = 0; i < RX_RING_SIZE; i++) {
|
||||
struct sk_buff *skb = dev_alloc_skb(ep->rx_buf_sz);
|
||||
struct sk_buff *skb = dev_alloc_skb(ep->rx_buf_sz + 2);
|
||||
ep->rx_skbuff[i] = skb;
|
||||
if (skb == NULL)
|
||||
break;
|
||||
@ -1233,7 +1233,7 @@ static int epic_rx(struct net_device *dev, int budget)
|
||||
entry = ep->dirty_rx % RX_RING_SIZE;
|
||||
if (ep->rx_skbuff[entry] == NULL) {
|
||||
struct sk_buff *skb;
|
||||
skb = ep->rx_skbuff[entry] = dev_alloc_skb(ep->rx_buf_sz);
|
||||
skb = ep->rx_skbuff[entry] = dev_alloc_skb(ep->rx_buf_sz + 2);
|
||||
if (skb == NULL)
|
||||
break;
|
||||
skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
|
||||
|
@ -1202,7 +1202,7 @@ static void hamachi_init_ring(struct net_device *dev)
|
||||
}
|
||||
/* Fill in the Rx buffers. Handle allocation failure gracefully. */
|
||||
for (i = 0; i < RX_RING_SIZE; i++) {
|
||||
struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz);
|
||||
struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz + 2);
|
||||
hmp->rx_skbuff[i] = skb;
|
||||
if (skb == NULL)
|
||||
break;
|
||||
@ -1669,7 +1669,7 @@ static int hamachi_rx(struct net_device *dev)
|
||||
entry = hmp->dirty_rx % RX_RING_SIZE;
|
||||
desc = &(hmp->rx_ring[entry]);
|
||||
if (hmp->rx_skbuff[entry] == NULL) {
|
||||
struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz);
|
||||
struct sk_buff *skb = dev_alloc_skb(hmp->rx_buf_sz + 2);
|
||||
|
||||
hmp->rx_skbuff[entry] = skb;
|
||||
if (skb == NULL)
|
||||
|
@ -690,6 +690,7 @@ static void block_output(struct net_device *dev, int count,
|
||||
static struct pcmcia_device_id axnet_ids[] = {
|
||||
PCMCIA_PFC_DEVICE_MANF_CARD(0, 0x016c, 0x0081),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x018a, 0x0301),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x2328),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0301),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0303),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0309),
|
||||
|
@ -1493,7 +1493,6 @@ static struct pcmcia_device_id pcnet_ids[] = {
|
||||
PCMCIA_DEVICE_MANF_CARD(0x0149, 0x4530),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x0149, 0xc1ab),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x0186, 0x0110),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x2328),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x01bf, 0x8041),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x0213, 0x2452),
|
||||
PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0300),
|
||||
|
@ -1016,7 +1016,7 @@ static void init_ring(struct net_device *dev)
|
||||
|
||||
/* Fill in the Rx buffers. Handle allocation failure gracefully. */
|
||||
for (i = 0; i < RX_RING_SIZE; i++) {
|
||||
struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz);
|
||||
struct sk_buff *skb = dev_alloc_skb(np->rx_buf_sz + 2);
|
||||
np->rx_skbuff[i] = skb;
|
||||
if (skb == NULL)
|
||||
break;
|
||||
@ -1407,7 +1407,7 @@ static void refill_rx (struct net_device *dev)
|
||||
struct sk_buff *skb;
|
||||
entry = np->dirty_rx % RX_RING_SIZE;
|
||||
if (np->rx_skbuff[entry] == NULL) {
|
||||
skb = dev_alloc_skb(np->rx_buf_sz);
|
||||
skb = dev_alloc_skb(np->rx_buf_sz + 2);
|
||||
np->rx_skbuff[entry] = skb;
|
||||
if (skb == NULL)
|
||||
break; /* Better luck next round. */
|
||||
|
@ -324,7 +324,7 @@ static int bdx_fw_load(struct bdx_priv *priv)
|
||||
ENTER;
|
||||
master = READ_REG(priv, regINIT_SEMAPHORE);
|
||||
if (!READ_REG(priv, regINIT_STATUS) && master) {
|
||||
rc = request_firmware(&fw, "tehuti/firmware.bin", &priv->pdev->dev);
|
||||
rc = request_firmware(&fw, "tehuti/bdx.bin", &priv->pdev->dev);
|
||||
if (rc)
|
||||
goto out;
|
||||
bdx_tx_push_desc_safe(priv, (char *)fw->data, fw->size);
|
||||
@ -2510,4 +2510,4 @@ module_exit(bdx_module_exit);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(BDX_DRV_DESC);
|
||||
MODULE_FIRMWARE("tehuti/firmware.bin");
|
||||
MODULE_FIRMWARE("tehuti/bdx.bin");
|
||||
|
@ -1004,7 +1004,6 @@ typhoon_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
|
||||
}
|
||||
|
||||
strcpy(info->driver, KBUILD_MODNAME);
|
||||
strcpy(info->version, UTS_RELEASE);
|
||||
strcpy(info->bus_info, pci_name(pci_dev));
|
||||
}
|
||||
|
||||
|
@ -1507,6 +1507,10 @@ static const struct usb_device_id products [] = {
|
||||
// ASIX AX88178 10/100/1000
|
||||
USB_DEVICE (0x0b95, 0x1780),
|
||||
.driver_info = (unsigned long) &ax88178_info,
|
||||
}, {
|
||||
// Logitec LAN-GTJ/U2A
|
||||
USB_DEVICE (0x0789, 0x0160),
|
||||
.driver_info = (unsigned long) &ax88178_info,
|
||||
}, {
|
||||
// Linksys USB200M Rev 2
|
||||
USB_DEVICE (0x13b1, 0x0018),
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* MOSCHIP MCS7830 based USB 2.0 Ethernet Devices
|
||||
* MOSCHIP MCS7830 based (7730/7830/7832) USB 2.0 Ethernet Devices
|
||||
*
|
||||
* based on usbnet.c, asix.c and the vendor provided mcs7830 driver
|
||||
*
|
||||
@ -11,6 +11,9 @@
|
||||
*
|
||||
* Definitions gathered from MOSCHIP, Data Sheet_7830DA.pdf (thanks!).
|
||||
*
|
||||
* 2010-12-19: add 7832 USB PID ("functionality same as MCS7830"),
|
||||
* per active notification by manufacturer
|
||||
*
|
||||
* TODO:
|
||||
* - support HIF_REG_CONFIG_SLEEPMODE/HIF_REG_CONFIG_TXENABLE (via autopm?)
|
||||
* - implement ethtool_ops get_pauseparam/set_pauseparam
|
||||
@ -60,6 +63,7 @@
|
||||
#define MCS7830_MAX_MCAST 64
|
||||
|
||||
#define MCS7830_VENDOR_ID 0x9710
|
||||
#define MCS7832_PRODUCT_ID 0x7832
|
||||
#define MCS7830_PRODUCT_ID 0x7830
|
||||
#define MCS7730_PRODUCT_ID 0x7730
|
||||
|
||||
@ -351,7 +355,7 @@ static int mcs7830_set_autoneg(struct usbnet *dev, int ptrUserPhyMode)
|
||||
if (!ret)
|
||||
ret = mcs7830_write_phy(dev, MII_BMCR,
|
||||
BMCR_ANENABLE | BMCR_ANRESTART );
|
||||
return ret < 0 ? : 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@ -626,7 +630,7 @@ static int mcs7830_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
|
||||
}
|
||||
|
||||
static const struct driver_info moschip_info = {
|
||||
.description = "MOSCHIP 7830/7730 usb-NET adapter",
|
||||
.description = "MOSCHIP 7830/7832/7730 usb-NET adapter",
|
||||
.bind = mcs7830_bind,
|
||||
.rx_fixup = mcs7830_rx_fixup,
|
||||
.flags = FLAG_ETHER,
|
||||
@ -644,6 +648,10 @@ static const struct driver_info sitecom_info = {
|
||||
};
|
||||
|
||||
static const struct usb_device_id products[] = {
|
||||
{
|
||||
USB_DEVICE(MCS7830_VENDOR_ID, MCS7832_PRODUCT_ID),
|
||||
.driver_info = (unsigned long) &moschip_info,
|
||||
},
|
||||
{
|
||||
USB_DEVICE(MCS7830_VENDOR_ID, MCS7830_PRODUCT_ID),
|
||||
.driver_info = (unsigned long) &moschip_info,
|
||||
|
@ -166,7 +166,9 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
if (!(rcv->flags & IFF_UP))
|
||||
goto tx_drop;
|
||||
|
||||
if (dev->features & NETIF_F_NO_CSUM)
|
||||
/* don't change ip_summed == CHECKSUM_PARTIAL, as that
|
||||
will cause bad checksum on forwarded packets */
|
||||
if (skb->ip_summed == CHECKSUM_NONE)
|
||||
skb->ip_summed = rcv_priv->ip_summed;
|
||||
|
||||
length = skb->len + ETH_HLEN;
|
||||
|
@ -891,7 +891,6 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local,
|
||||
|
||||
SET_ETHTOOL_OPS(dev, &prism2_ethtool_ops);
|
||||
|
||||
netif_stop_queue(dev);
|
||||
}
|
||||
|
||||
static int hostap_enable_hostapd(local_info_t *local, int rtnl_locked)
|
||||
|
@ -315,6 +315,7 @@ struct iwl_cfg iwl100_bgn_cfg = {
|
||||
.mod_params = &iwlagn_mod_params,
|
||||
.base_params = &iwl1000_base_params,
|
||||
.ht_params = &iwl1000_ht_params,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl100_bg_cfg = {
|
||||
@ -330,6 +331,7 @@ struct iwl_cfg iwl100_bg_cfg = {
|
||||
.ops = &iwl1000_ops,
|
||||
.mod_params = &iwlagn_mod_params,
|
||||
.base_params = &iwl1000_base_params,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX));
|
||||
|
@ -561,6 +561,7 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = {
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
.need_dc_calib = true,
|
||||
.need_temp_offset_calib = true,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000g2a_2abg_cfg = {
|
||||
@ -578,6 +579,7 @@ struct iwl_cfg iwl6000g2a_2abg_cfg = {
|
||||
.base_params = &iwl6000_base_params,
|
||||
.need_dc_calib = true,
|
||||
.need_temp_offset_calib = true,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000g2a_2bg_cfg = {
|
||||
@ -595,6 +597,7 @@ struct iwl_cfg iwl6000g2a_2bg_cfg = {
|
||||
.base_params = &iwl6000_base_params,
|
||||
.need_dc_calib = true,
|
||||
.need_temp_offset_calib = true,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000g2b_2agn_cfg = {
|
||||
@ -616,6 +619,7 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = {
|
||||
.need_temp_offset_calib = true,
|
||||
/* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
|
||||
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000g2b_2abg_cfg = {
|
||||
@ -636,6 +640,7 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = {
|
||||
.need_temp_offset_calib = true,
|
||||
/* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
|
||||
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000g2b_2bgn_cfg = {
|
||||
@ -657,6 +662,7 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = {
|
||||
.need_temp_offset_calib = true,
|
||||
/* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
|
||||
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000g2b_2bg_cfg = {
|
||||
@ -677,6 +683,7 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = {
|
||||
.need_temp_offset_calib = true,
|
||||
/* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
|
||||
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000g2b_bgn_cfg = {
|
||||
@ -698,6 +705,7 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = {
|
||||
.need_temp_offset_calib = true,
|
||||
/* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
|
||||
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6000g2b_bg_cfg = {
|
||||
@ -718,6 +726,7 @@ struct iwl_cfg iwl6000g2b_bg_cfg = {
|
||||
.need_temp_offset_calib = true,
|
||||
/* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
|
||||
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
/*
|
||||
@ -804,6 +813,7 @@ struct iwl_cfg iwl6050g2_bgn_cfg = {
|
||||
.base_params = &iwl6050_base_params,
|
||||
.ht_params = &iwl6000_ht_params,
|
||||
.need_dc_calib = true,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl6050_2abg_cfg = {
|
||||
@ -857,6 +867,7 @@ struct iwl_cfg iwl130_bgn_cfg = {
|
||||
.need_dc_calib = true,
|
||||
/* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
|
||||
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
struct iwl_cfg iwl130_bg_cfg = {
|
||||
@ -876,6 +887,7 @@ struct iwl_cfg iwl130_bg_cfg = {
|
||||
.need_dc_calib = true,
|
||||
/* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
|
||||
.scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
|
||||
.use_new_eeprom_reading = true,
|
||||
};
|
||||
|
||||
MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
|
||||
|
@ -392,7 +392,7 @@ static s8 iwl_update_channel_txpower(struct iwl_priv *priv,
|
||||
/**
|
||||
* iwlcore_eeprom_enhanced_txpower: process enhanced tx power info
|
||||
*/
|
||||
void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv)
|
||||
static void iwlcore_eeprom_enhanced_txpower_old(struct iwl_priv *priv)
|
||||
{
|
||||
int eeprom_section_count = 0;
|
||||
int section, element;
|
||||
@ -419,7 +419,8 @@ void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv)
|
||||
* always check for valid entry before process
|
||||
* the information
|
||||
*/
|
||||
if (!enhanced_txpower->common || enhanced_txpower->reserved)
|
||||
if (!(enhanced_txpower->flags || enhanced_txpower->channel) ||
|
||||
enhanced_txpower->delta_20_in_40)
|
||||
continue;
|
||||
|
||||
for (element = 0; element < eeprom_section_count; element++) {
|
||||
@ -452,3 +453,86 @@ void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
iwlcore_eeprom_enh_txp_read_element(struct iwl_priv *priv,
|
||||
struct iwl_eeprom_enhanced_txpwr *txp,
|
||||
s8 max_txpower_avg)
|
||||
{
|
||||
int ch_idx;
|
||||
bool is_ht40 = txp->flags & IWL_EEPROM_ENH_TXP_FL_40MHZ;
|
||||
enum ieee80211_band band;
|
||||
|
||||
band = txp->flags & IWL_EEPROM_ENH_TXP_FL_BAND_52G ?
|
||||
IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ;
|
||||
|
||||
for (ch_idx = 0; ch_idx < priv->channel_count; ch_idx++) {
|
||||
struct iwl_channel_info *ch_info = &priv->channel_info[ch_idx];
|
||||
|
||||
/* update matching channel or from common data only */
|
||||
if (txp->channel != 0 && ch_info->channel != txp->channel)
|
||||
continue;
|
||||
|
||||
/* update matching band only */
|
||||
if (band != ch_info->band)
|
||||
continue;
|
||||
|
||||
if (ch_info->max_power_avg < max_txpower_avg && !is_ht40) {
|
||||
ch_info->max_power_avg = max_txpower_avg;
|
||||
ch_info->curr_txpow = max_txpower_avg;
|
||||
ch_info->scan_power = max_txpower_avg;
|
||||
}
|
||||
|
||||
if (is_ht40 && ch_info->ht40_max_power_avg < max_txpower_avg)
|
||||
ch_info->ht40_max_power_avg = max_txpower_avg;
|
||||
}
|
||||
}
|
||||
|
||||
#define EEPROM_TXP_OFFS (0x00 | INDIRECT_ADDRESS | INDIRECT_TXP_LIMIT)
|
||||
#define EEPROM_TXP_ENTRY_LEN sizeof(struct iwl_eeprom_enhanced_txpwr)
|
||||
#define EEPROM_TXP_SZ_OFFS (0x00 | INDIRECT_ADDRESS | INDIRECT_TXP_LIMIT_SIZE)
|
||||
|
||||
static void iwlcore_eeprom_enhanced_txpower_new(struct iwl_priv *priv)
|
||||
{
|
||||
struct iwl_eeprom_enhanced_txpwr *txp_array, *txp;
|
||||
int idx, entries;
|
||||
__le16 *txp_len;
|
||||
s8 max_txp_avg, max_txp_avg_halfdbm;
|
||||
|
||||
BUILD_BUG_ON(sizeof(struct iwl_eeprom_enhanced_txpwr) != 8);
|
||||
|
||||
/* the length is in 16-bit words, but we want entries */
|
||||
txp_len = (__le16 *) iwlagn_eeprom_query_addr(priv, EEPROM_TXP_SZ_OFFS);
|
||||
entries = le16_to_cpup(txp_len) * 2 / EEPROM_TXP_ENTRY_LEN;
|
||||
|
||||
txp_array = (void *) iwlagn_eeprom_query_addr(priv, EEPROM_TXP_OFFS);
|
||||
for (idx = 0; idx < entries; idx++) {
|
||||
txp = &txp_array[idx];
|
||||
|
||||
/* skip invalid entries */
|
||||
if (!(txp->flags & IWL_EEPROM_ENH_TXP_FL_VALID))
|
||||
continue;
|
||||
|
||||
max_txp_avg = iwl_get_max_txpower_avg(priv, txp_array, idx,
|
||||
&max_txp_avg_halfdbm);
|
||||
|
||||
/*
|
||||
* Update the user limit values values to the highest
|
||||
* power supported by any channel
|
||||
*/
|
||||
if (max_txp_avg > priv->tx_power_user_lmt)
|
||||
priv->tx_power_user_lmt = max_txp_avg;
|
||||
if (max_txp_avg_halfdbm > priv->tx_power_lmt_in_half_dbm)
|
||||
priv->tx_power_lmt_in_half_dbm = max_txp_avg_halfdbm;
|
||||
|
||||
iwlcore_eeprom_enh_txp_read_element(priv, txp, max_txp_avg);
|
||||
}
|
||||
}
|
||||
|
||||
void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv)
|
||||
{
|
||||
if (priv->cfg->use_new_eeprom_reading)
|
||||
iwlcore_eeprom_enhanced_txpower_new(priv);
|
||||
else
|
||||
iwlcore_eeprom_enhanced_txpower_old(priv);
|
||||
}
|
||||
|
@ -569,6 +569,12 @@ static u32 eeprom_indirect_address(const struct iwl_priv *priv, u32 address)
|
||||
case INDIRECT_REGULATORY:
|
||||
offset = iwl_eeprom_query16(priv, EEPROM_LINK_REGULATORY);
|
||||
break;
|
||||
case INDIRECT_TXP_LIMIT:
|
||||
offset = iwl_eeprom_query16(priv, EEPROM_LINK_TXP_LIMIT);
|
||||
break;
|
||||
case INDIRECT_TXP_LIMIT_SIZE:
|
||||
offset = iwl_eeprom_query16(priv, EEPROM_LINK_TXP_LIMIT_SIZE);
|
||||
break;
|
||||
case INDIRECT_CALIBRATION:
|
||||
offset = iwl_eeprom_query16(priv, EEPROM_LINK_CALIBRATION);
|
||||
break;
|
||||
|
@ -390,6 +390,7 @@ struct iwl_cfg {
|
||||
const bool need_temp_offset_calib; /* if used set to true */
|
||||
u8 scan_rx_antennas[IEEE80211_NUM_BANDS];
|
||||
u8 scan_tx_antennas[IEEE80211_NUM_BANDS];
|
||||
const bool use_new_eeprom_reading; /* temporary, remove later */
|
||||
};
|
||||
|
||||
/***************************
|
||||
|
@ -120,6 +120,17 @@ struct iwl_eeprom_channel {
|
||||
s8 max_power_avg; /* max power (dBm) on this chnl, limit 31 */
|
||||
} __packed;
|
||||
|
||||
enum iwl_eeprom_enhanced_txpwr_flags {
|
||||
IWL_EEPROM_ENH_TXP_FL_VALID = BIT(0),
|
||||
IWL_EEPROM_ENH_TXP_FL_BAND_52G = BIT(1),
|
||||
IWL_EEPROM_ENH_TXP_FL_OFDM = BIT(2),
|
||||
IWL_EEPROM_ENH_TXP_FL_40MHZ = BIT(3),
|
||||
IWL_EEPROM_ENH_TXP_FL_HT_AP = BIT(4),
|
||||
IWL_EEPROM_ENH_TXP_FL_RES1 = BIT(5),
|
||||
IWL_EEPROM_ENH_TXP_FL_RES2 = BIT(6),
|
||||
IWL_EEPROM_ENH_TXP_FL_COMMON_TYPE = BIT(7),
|
||||
};
|
||||
|
||||
/**
|
||||
* iwl_eeprom_enhanced_txpwr structure
|
||||
* This structure presents the enhanced regulatory tx power limit layout
|
||||
@ -127,21 +138,23 @@ struct iwl_eeprom_channel {
|
||||
* Enhanced regulatory tx power portion of eeprom image can be broken down
|
||||
* into individual structures; each one is 8 bytes in size and contain the
|
||||
* following information
|
||||
* @common: (desc + channel) not used by driver, should _NOT_ be "zero"
|
||||
* @flags: entry flags
|
||||
* @channel: channel number
|
||||
* @chain_a_max_pwr: chain a max power in 1/2 dBm
|
||||
* @chain_b_max_pwr: chain b max power in 1/2 dBm
|
||||
* @chain_c_max_pwr: chain c max power in 1/2 dBm
|
||||
* @reserved: not used, should be "zero"
|
||||
* @delta_20_in_40: 20-in-40 deltas (hi/lo)
|
||||
* @mimo2_max_pwr: mimo2 max power in 1/2 dBm
|
||||
* @mimo3_max_pwr: mimo3 max power in 1/2 dBm
|
||||
*
|
||||
*/
|
||||
struct iwl_eeprom_enhanced_txpwr {
|
||||
__le16 common;
|
||||
u8 flags;
|
||||
u8 channel;
|
||||
s8 chain_a_max;
|
||||
s8 chain_b_max;
|
||||
s8 chain_c_max;
|
||||
s8 reserved;
|
||||
u8 delta_20_in_40;
|
||||
s8 mimo2_max;
|
||||
s8 mimo3_max;
|
||||
} __packed;
|
||||
@ -186,6 +199,8 @@ struct iwl_eeprom_enhanced_txpwr {
|
||||
#define EEPROM_LINK_CALIBRATION (2*0x67)
|
||||
#define EEPROM_LINK_PROCESS_ADJST (2*0x68)
|
||||
#define EEPROM_LINK_OTHERS (2*0x69)
|
||||
#define EEPROM_LINK_TXP_LIMIT (2*0x6a)
|
||||
#define EEPROM_LINK_TXP_LIMIT_SIZE (2*0x6b)
|
||||
|
||||
/* agn regulatory - indirect access */
|
||||
#define EEPROM_REG_BAND_1_CHANNELS ((0x08)\
|
||||
@ -389,6 +404,8 @@ struct iwl_eeprom_calib_info {
|
||||
#define INDIRECT_CALIBRATION 0x00040000
|
||||
#define INDIRECT_PROCESS_ADJST 0x00050000
|
||||
#define INDIRECT_OTHERS 0x00060000
|
||||
#define INDIRECT_TXP_LIMIT 0x00070000
|
||||
#define INDIRECT_TXP_LIMIT_SIZE 0x00080000
|
||||
#define INDIRECT_ADDRESS 0x00100000
|
||||
|
||||
/* General */
|
||||
|
@ -619,7 +619,7 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
|
||||
print_ssid(ssid_buf, ssid, ssid_len),
|
||||
LBS_SCAN_RSSI_TO_MBM(rssi)/100);
|
||||
|
||||
if (channel ||
|
||||
if (channel &&
|
||||
!(channel->flags & IEEE80211_CHAN_DISABLED))
|
||||
cfg80211_inform_bss(wiphy, channel,
|
||||
bssid, le64_to_cpu(*(__le64 *)tsfdesc),
|
||||
|
@ -43,6 +43,7 @@ MODULE_FIRMWARE("isl3887usb");
|
||||
|
||||
static struct usb_device_id p54u_table[] __devinitdata = {
|
||||
/* Version 1 devices (pci chip + net2280) */
|
||||
{USB_DEVICE(0x0411, 0x0050)}, /* Buffalo WLI2-USB2-G54 */
|
||||
{USB_DEVICE(0x045e, 0x00c2)}, /* Microsoft MN-710 */
|
||||
{USB_DEVICE(0x0506, 0x0a11)}, /* 3COM 3CRWE254G72 */
|
||||
{USB_DEVICE(0x06b9, 0x0120)}, /* Thomson SpeedTouch 120g */
|
||||
@ -56,9 +57,13 @@ static struct usb_device_id p54u_table[] __devinitdata = {
|
||||
{USB_DEVICE(0x0846, 0x4220)}, /* Netgear WG111 */
|
||||
{USB_DEVICE(0x09aa, 0x1000)}, /* Spinnaker Proto board */
|
||||
{USB_DEVICE(0x0cde, 0x0006)}, /* Medion 40900, Roper Europe */
|
||||
{USB_DEVICE(0x0db0, 0x6826)}, /* MSI UB54G (MS-6826) */
|
||||
{USB_DEVICE(0x107b, 0x55f2)}, /* Gateway WGU-210 (Gemtek) */
|
||||
{USB_DEVICE(0x124a, 0x4023)}, /* Shuttle PN15, Airvast WM168g, IOGear GWU513 */
|
||||
{USB_DEVICE(0x1435, 0x0210)}, /* Inventel UR054G */
|
||||
{USB_DEVICE(0x15a9, 0x0002)}, /* Gemtek WUBI-100GW 802.11g */
|
||||
{USB_DEVICE(0x1630, 0x0005)}, /* 2Wire 802.11g USB (v1) / Z-Com */
|
||||
{USB_DEVICE(0x182d, 0x096b)}, /* Sitecom WL-107 */
|
||||
{USB_DEVICE(0x1915, 0x2234)}, /* Linksys WUSB54G OEM */
|
||||
{USB_DEVICE(0x1915, 0x2235)}, /* Linksys WUSB54G Portable OEM */
|
||||
{USB_DEVICE(0x2001, 0x3701)}, /* DLink DWL-G120 Spinnaker */
|
||||
@ -94,6 +99,7 @@ static struct usb_device_id p54u_table[] __devinitdata = {
|
||||
{USB_DEVICE(0x1435, 0x0427)}, /* Inventel UR054G */
|
||||
{USB_DEVICE(0x1668, 0x1050)}, /* Actiontec 802UIG-1 */
|
||||
{USB_DEVICE(0x2001, 0x3704)}, /* DLink DWL-G122 rev A2 */
|
||||
{USB_DEVICE(0x2001, 0x3705)}, /* D-Link DWL-G120 rev C1 */
|
||||
{USB_DEVICE(0x413c, 0x5513)}, /* Dell WLA3310 USB Wireless Adapter */
|
||||
{USB_DEVICE(0x413c, 0x8102)}, /* Spinnaker DUT */
|
||||
{USB_DEVICE(0x413c, 0x8104)}, /* Cohiba Proto board */
|
||||
|
@ -912,6 +912,7 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev)
|
||||
__set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_REQUIRE_TXSTATUS_FIFO, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_REQUIRE_TASKLET_CONTEXT, &rt2x00dev->flags);
|
||||
if (!modparam_nohwcrypt)
|
||||
__set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
|
||||
__set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags);
|
||||
|
@ -664,6 +664,7 @@ enum rt2x00_flags {
|
||||
DRIVER_REQUIRE_COPY_IV,
|
||||
DRIVER_REQUIRE_L2PAD,
|
||||
DRIVER_REQUIRE_TXSTATUS_FIFO,
|
||||
DRIVER_REQUIRE_TASKLET_CONTEXT,
|
||||
|
||||
/*
|
||||
* Driver features
|
||||
|
@ -390,9 +390,12 @@ void rt2x00lib_txdone(struct queue_entry *entry,
|
||||
* through a mac80211 library call (RTS/CTS) then we should not
|
||||
* send the status report back.
|
||||
*/
|
||||
if (!(skbdesc_flags & SKBDESC_NOT_MAC80211))
|
||||
ieee80211_tx_status(rt2x00dev->hw, entry->skb);
|
||||
else
|
||||
if (!(skbdesc_flags & SKBDESC_NOT_MAC80211)) {
|
||||
if (test_bit(DRIVER_REQUIRE_TASKLET_CONTEXT, &rt2x00dev->flags))
|
||||
ieee80211_tx_status(rt2x00dev->hw, entry->skb);
|
||||
else
|
||||
ieee80211_tx_status_ni(rt2x00dev->hw, entry->skb);
|
||||
} else
|
||||
dev_kfree_skb_any(entry->skb);
|
||||
|
||||
/*
|
||||
|
@ -744,7 +744,7 @@ static int yellowfin_init_ring(struct net_device *dev)
|
||||
}
|
||||
|
||||
for (i = 0; i < RX_RING_SIZE; i++) {
|
||||
struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz);
|
||||
struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz + 2);
|
||||
yp->rx_skbuff[i] = skb;
|
||||
if (skb == NULL)
|
||||
break;
|
||||
@ -1157,7 +1157,7 @@ static int yellowfin_rx(struct net_device *dev)
|
||||
for (; yp->cur_rx - yp->dirty_rx > 0; yp->dirty_rx++) {
|
||||
entry = yp->dirty_rx % RX_RING_SIZE;
|
||||
if (yp->rx_skbuff[entry] == NULL) {
|
||||
struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz);
|
||||
struct sk_buff *skb = dev_alloc_skb(yp->rx_buf_sz + 2);
|
||||
if (skb == NULL)
|
||||
break; /* Better luck next round. */
|
||||
yp->rx_skbuff[entry] = skb;
|
||||
|
@ -61,7 +61,7 @@ void of_i2c_register_devices(struct i2c_adapter *adap)
|
||||
info.of_node = of_node_get(node);
|
||||
info.archdata = &dev_ad;
|
||||
|
||||
request_module("%s", info.type);
|
||||
request_module("%s%s", I2C_MODULE_PREFIX, info.type);
|
||||
|
||||
result = i2c_new_device(adap, &info);
|
||||
if (result == NULL) {
|
||||
|
@ -115,7 +115,8 @@ static struct pcie_port_service_driver __initdata dummy_driver = {
|
||||
static int __init select_detection_mode(void)
|
||||
{
|
||||
struct dummy_slot *slot, *tmp;
|
||||
pcie_port_service_register(&dummy_driver);
|
||||
if (pcie_port_service_register(&dummy_driver))
|
||||
return PCIEHP_DETECT_ACPI;
|
||||
pcie_port_service_unregister(&dummy_driver);
|
||||
list_for_each_entry_safe(slot, tmp, &dummy_slots, list) {
|
||||
list_del(&slot->list);
|
||||
|
@ -207,7 +207,7 @@ static int rs5c372_get_datetime(struct i2c_client *client, struct rtc_time *tm)
|
||||
static int rs5c372_set_datetime(struct i2c_client *client, struct rtc_time *tm)
|
||||
{
|
||||
struct rs5c372 *rs5c = i2c_get_clientdata(client);
|
||||
unsigned char buf[8];
|
||||
unsigned char buf[7];
|
||||
int addr;
|
||||
|
||||
dev_dbg(&client->dev, "%s: tm is secs=%d, mins=%d, hours=%d "
|
||||
|
@ -677,7 +677,7 @@ bfa_fcs_fabric_sm_isolated(struct bfa_fcs_fabric_s *fabric,
|
||||
bfa_trc(fabric->fcs, event);
|
||||
wwn2str(pwwn_ptr, fabric->bport.port_cfg.pwwn);
|
||||
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Port is isolated due to VF_ID mismatch. "
|
||||
"PWWN: %s Port VF_ID: %04x switch port VF_ID: %04x.",
|
||||
pwwn_ptr, fabric->fcs->port_vfid,
|
||||
@ -1411,7 +1411,7 @@ bfa_fcs_fabric_set_fabric_name(struct bfa_fcs_fabric_s *fabric,
|
||||
wwn2str(pwwn_ptr, bfa_fcs_lport_get_pwwn(&fabric->bport));
|
||||
wwn2str(fwwn_ptr,
|
||||
bfa_fcs_lport_get_fabric_name(&fabric->bport));
|
||||
BFA_LOG(KERN_WARNING, bfad, log_level,
|
||||
BFA_LOG(KERN_WARNING, bfad, bfa_log_level,
|
||||
"Base port WWN = %s Fabric WWN = %s\n",
|
||||
pwwn_ptr, fwwn_ptr);
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ bfa_fcs_itnim_sm_hcb_online(struct bfa_fcs_itnim_s *itnim,
|
||||
bfa_fcb_itnim_online(itnim->itnim_drv);
|
||||
wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(itnim->rport->port));
|
||||
wwn2str(rpwwn_buf, itnim->rport->pwwn);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Target (WWN = %s) is online for initiator (WWN = %s)\n",
|
||||
rpwwn_buf, lpwwn_buf);
|
||||
break;
|
||||
@ -301,11 +301,11 @@ bfa_fcs_itnim_sm_online(struct bfa_fcs_itnim_s *itnim,
|
||||
wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(itnim->rport->port));
|
||||
wwn2str(rpwwn_buf, itnim->rport->pwwn);
|
||||
if (bfa_fcs_lport_is_online(itnim->rport->port) == BFA_TRUE)
|
||||
BFA_LOG(KERN_ERR, bfad, log_level,
|
||||
BFA_LOG(KERN_ERR, bfad, bfa_log_level,
|
||||
"Target (WWN = %s) connectivity lost for "
|
||||
"initiator (WWN = %s)\n", rpwwn_buf, lpwwn_buf);
|
||||
else
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Target (WWN = %s) offlined by initiator (WWN = %s)\n",
|
||||
rpwwn_buf, lpwwn_buf);
|
||||
break;
|
||||
|
@ -491,7 +491,7 @@ bfa_fcs_lport_online_actions(struct bfa_fcs_lport_s *port)
|
||||
__port_action[port->fabric->fab_type].online(port);
|
||||
|
||||
wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port));
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Logical port online: WWN = %s Role = %s\n",
|
||||
lpwwn_buf, "Initiator");
|
||||
|
||||
@ -512,11 +512,11 @@ bfa_fcs_lport_offline_actions(struct bfa_fcs_lport_s *port)
|
||||
|
||||
wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port));
|
||||
if (bfa_fcs_fabric_is_online(port->fabric) == BFA_TRUE)
|
||||
BFA_LOG(KERN_ERR, bfad, log_level,
|
||||
BFA_LOG(KERN_ERR, bfad, bfa_log_level,
|
||||
"Logical port lost fabric connectivity: WWN = %s Role = %s\n",
|
||||
lpwwn_buf, "Initiator");
|
||||
else
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Logical port taken offline: WWN = %s Role = %s\n",
|
||||
lpwwn_buf, "Initiator");
|
||||
|
||||
@ -573,7 +573,7 @@ bfa_fcs_lport_deleted(struct bfa_fcs_lport_s *port)
|
||||
char lpwwn_buf[BFA_STRING_32];
|
||||
|
||||
wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port));
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Logical port deleted: WWN = %s Role = %s\n",
|
||||
lpwwn_buf, "Initiator");
|
||||
|
||||
@ -878,7 +878,7 @@ bfa_fcs_lport_init(struct bfa_fcs_lport_s *lport,
|
||||
vport ? vport->vport_drv : NULL);
|
||||
|
||||
wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(lport));
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"New logical port created: WWN = %s Role = %s\n",
|
||||
lpwwn_buf, "Initiator");
|
||||
|
||||
|
@ -2056,7 +2056,7 @@ bfa_fcs_rport_online_action(struct bfa_fcs_rport_s *rport)
|
||||
wwn2str(lpwwn_buf, bfa_fcs_lport_get_pwwn(port));
|
||||
wwn2str(rpwwn_buf, rport->pwwn);
|
||||
if (!BFA_FCS_PID_IS_WKA(rport->pid))
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Remote port (WWN = %s) online for logical port (WWN = %s)\n",
|
||||
rpwwn_buf, lpwwn_buf);
|
||||
}
|
||||
@ -2075,12 +2075,12 @@ bfa_fcs_rport_offline_action(struct bfa_fcs_rport_s *rport)
|
||||
wwn2str(rpwwn_buf, rport->pwwn);
|
||||
if (!BFA_FCS_PID_IS_WKA(rport->pid)) {
|
||||
if (bfa_fcs_lport_is_online(rport->port) == BFA_TRUE)
|
||||
BFA_LOG(KERN_ERR, bfad, log_level,
|
||||
BFA_LOG(KERN_ERR, bfad, bfa_log_level,
|
||||
"Remote port (WWN = %s) connectivity lost for "
|
||||
"logical port (WWN = %s)\n",
|
||||
rpwwn_buf, lpwwn_buf);
|
||||
else
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Remote port (WWN = %s) offlined by "
|
||||
"logical port (WWN = %s)\n",
|
||||
rpwwn_buf, lpwwn_buf);
|
||||
|
@ -402,7 +402,7 @@ bfa_ioc_sm_op_entry(struct bfa_ioc_s *ioc)
|
||||
|
||||
ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_OK);
|
||||
bfa_ioc_hb_monitor(ioc);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level, "IOC enabled\n");
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level, "IOC enabled\n");
|
||||
}
|
||||
|
||||
static void
|
||||
@ -444,7 +444,7 @@ bfa_ioc_sm_disabling_entry(struct bfa_ioc_s *ioc)
|
||||
{
|
||||
struct bfad_s *bfad = (struct bfad_s *)ioc->bfa->bfad;
|
||||
bfa_iocpf_disable(ioc);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level, "IOC disabled\n");
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level, "IOC disabled\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@ -565,7 +565,7 @@ bfa_ioc_sm_fail_entry(struct bfa_ioc_s *ioc)
|
||||
notify->cbfn(notify->cbarg);
|
||||
}
|
||||
|
||||
BFA_LOG(KERN_CRIT, bfad, log_level,
|
||||
BFA_LOG(KERN_CRIT, bfad, bfa_log_level,
|
||||
"Heart Beat of IOC has failed\n");
|
||||
}
|
||||
|
||||
@ -1812,7 +1812,7 @@ bfa_ioc_pf_fwmismatch(struct bfa_ioc_s *ioc)
|
||||
* Provide enable completion callback.
|
||||
*/
|
||||
ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE);
|
||||
BFA_LOG(KERN_WARNING, bfad, log_level,
|
||||
BFA_LOG(KERN_WARNING, bfad, bfa_log_level,
|
||||
"Running firmware version is incompatible "
|
||||
"with the driver version\n");
|
||||
}
|
||||
|
@ -2138,7 +2138,7 @@ bfa_fcport_sm_enabling_qwait(struct bfa_fcport_s *fcport,
|
||||
bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
|
||||
BFA_PL_EID_PORT_DISABLE, 0, "Port Disable");
|
||||
wwn2str(pwwn_buf, fcport->pwwn);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port disabled: WWN = %s\n", pwwn_buf);
|
||||
break;
|
||||
|
||||
@ -2198,7 +2198,7 @@ bfa_fcport_sm_enabling(struct bfa_fcport_s *fcport,
|
||||
bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
|
||||
BFA_PL_EID_PORT_DISABLE, 0, "Port Disable");
|
||||
wwn2str(pwwn_buf, fcport->pwwn);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port disabled: WWN = %s\n", pwwn_buf);
|
||||
break;
|
||||
|
||||
@ -2251,7 +2251,7 @@ bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport,
|
||||
|
||||
bfa_fcport_scn(fcport, BFA_PORT_LINKUP, BFA_FALSE);
|
||||
wwn2str(pwwn_buf, fcport->pwwn);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port online: WWN = %s\n", pwwn_buf);
|
||||
break;
|
||||
|
||||
@ -2277,7 +2277,7 @@ bfa_fcport_sm_linkdown(struct bfa_fcport_s *fcport,
|
||||
bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
|
||||
BFA_PL_EID_PORT_DISABLE, 0, "Port Disable");
|
||||
wwn2str(pwwn_buf, fcport->pwwn);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port disabled: WWN = %s\n", pwwn_buf);
|
||||
break;
|
||||
|
||||
@ -2322,9 +2322,9 @@ bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport,
|
||||
bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
|
||||
BFA_PL_EID_PORT_DISABLE, 0, "Port Disable");
|
||||
wwn2str(pwwn_buf, fcport->pwwn);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port offline: WWN = %s\n", pwwn_buf);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port disabled: WWN = %s\n", pwwn_buf);
|
||||
break;
|
||||
|
||||
@ -2336,10 +2336,10 @@ bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport,
|
||||
BFA_PL_EID_PORT_ST_CHANGE, 0, "Port Linkdown");
|
||||
wwn2str(pwwn_buf, fcport->pwwn);
|
||||
if (BFA_PORT_IS_DISABLED(fcport->bfa))
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port offline: WWN = %s\n", pwwn_buf);
|
||||
else
|
||||
BFA_LOG(KERN_ERR, bfad, log_level,
|
||||
BFA_LOG(KERN_ERR, bfad, bfa_log_level,
|
||||
"Base port (WWN = %s) "
|
||||
"lost fabric connectivity\n", pwwn_buf);
|
||||
break;
|
||||
@ -2349,10 +2349,10 @@ bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport,
|
||||
bfa_fcport_reset_linkinfo(fcport);
|
||||
wwn2str(pwwn_buf, fcport->pwwn);
|
||||
if (BFA_PORT_IS_DISABLED(fcport->bfa))
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port offline: WWN = %s\n", pwwn_buf);
|
||||
else
|
||||
BFA_LOG(KERN_ERR, bfad, log_level,
|
||||
BFA_LOG(KERN_ERR, bfad, bfa_log_level,
|
||||
"Base port (WWN = %s) "
|
||||
"lost fabric connectivity\n", pwwn_buf);
|
||||
break;
|
||||
@ -2363,10 +2363,10 @@ bfa_fcport_sm_linkup(struct bfa_fcport_s *fcport,
|
||||
bfa_fcport_scn(fcport, BFA_PORT_LINKDOWN, BFA_FALSE);
|
||||
wwn2str(pwwn_buf, fcport->pwwn);
|
||||
if (BFA_PORT_IS_DISABLED(fcport->bfa))
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port offline: WWN = %s\n", pwwn_buf);
|
||||
else
|
||||
BFA_LOG(KERN_ERR, bfad, log_level,
|
||||
BFA_LOG(KERN_ERR, bfad, bfa_log_level,
|
||||
"Base port (WWN = %s) "
|
||||
"lost fabric connectivity\n", pwwn_buf);
|
||||
break;
|
||||
@ -2497,7 +2497,7 @@ bfa_fcport_sm_disabling(struct bfa_fcport_s *fcport,
|
||||
bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
|
||||
BFA_PL_EID_PORT_ENABLE, 0, "Port Enable");
|
||||
wwn2str(pwwn_buf, fcport->pwwn);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port enabled: WWN = %s\n", pwwn_buf);
|
||||
break;
|
||||
|
||||
@ -2551,7 +2551,7 @@ bfa_fcport_sm_disabled(struct bfa_fcport_s *fcport,
|
||||
bfa_plog_str(fcport->bfa->plog, BFA_PL_MID_HAL,
|
||||
BFA_PL_EID_PORT_ENABLE, 0, "Port Enable");
|
||||
wwn2str(pwwn_buf, fcport->pwwn);
|
||||
BFA_LOG(KERN_INFO, bfad, log_level,
|
||||
BFA_LOG(KERN_INFO, bfad, bfa_log_level,
|
||||
"Base port enabled: WWN = %s\n", pwwn_buf);
|
||||
break;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user