Merge tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg Kroah-Hartman: "Here's the driver core, and other driver subsystems, pull request for the 3.5-rc1 merge window. Outside of a few minor driver core changes, we ended up with the following different subsystem and core changes as well, due to interdependancies on the driver core: - hyperv driver updates - drivers/memory being created and some drivers moved into it - extcon driver subsystem created out of the old Android staging switch driver code - dynamic debug updates - printk rework, and /dev/kmsg changes All of this has been tested in the linux-next releases for a few weeks with no reported problems. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fix up conflicts in drivers/extcon/extcon-max8997.c where git noticed that a patch to the deleted drivers/misc/max8997-muic.c driver needs to be applied to this one. * tag 'driver-core-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (90 commits) uio_pdrv_genirq: get irq through platform resource if not set otherwise memory: tegra{20,30}-mc: Remove empty *_remove() printk() - isolate KERN_CONT users from ordinary complete lines sysfs: get rid of some lockdep false positives Drivers: hv: util: Properly handle version negotiations. Drivers: hv: Get rid of an unnecessary check in vmbus_prep_negotiate_resp() memory: tegra{20,30}-mc: Use dev_err_ratelimited() driver core: Add dev_*_ratelimited() family Driver Core: don't oops with unregistered driver in driver_find_device() printk() - restore prefix/timestamp printing for multi-newline strings printk: add stub for prepend_timestamp() ARM: tegra30: Make MC optional in Kconfig ARM: tegra20: Make MC optional in Kconfig ARM: tegra30: MC: Remove unnecessary BUG*() ARM: tegra20: MC: Remove unnecessary BUG*() printk: correctly align __log_buf ARM: tegra30: Add Tegra Memory Controller(MC) driver ARM: tegra20: Add Tegra Memory Controller(MC) driver printk() - restore timestamp printing at console output printk() - do not merge continuation lines of different threads ...
此提交包含在:
@@ -46,40 +46,61 @@ struct vmbus_channel_message_table_entry {
|
||||
*
|
||||
* @icmsghdrp is of type &struct icmsg_hdr.
|
||||
* @negop is of type &struct icmsg_negotiate.
|
||||
* Set up and fill in default negotiate response message. This response can
|
||||
* come from both the vmbus driver and the hv_utils driver. The current api
|
||||
* will respond properly to both Windows 2008 and Windows 2008-R2 operating
|
||||
* systems.
|
||||
* Set up and fill in default negotiate response message.
|
||||
*
|
||||
* The max_fw_version specifies the maximum framework version that
|
||||
* we can support and max _srv_version specifies the maximum service
|
||||
* version we can support. A special value MAX_SRV_VER can be
|
||||
* specified to indicate that we can handle the maximum version
|
||||
* exposed by the host.
|
||||
*
|
||||
* Mainly used by Hyper-V drivers.
|
||||
*/
|
||||
void vmbus_prep_negotiate_resp(struct icmsg_hdr *icmsghdrp,
|
||||
struct icmsg_negotiate *negop, u8 *buf)
|
||||
struct icmsg_negotiate *negop, u8 *buf,
|
||||
int max_fw_version, int max_srv_version)
|
||||
{
|
||||
if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) {
|
||||
icmsghdrp->icmsgsize = 0x10;
|
||||
int icframe_vercnt;
|
||||
int icmsg_vercnt;
|
||||
int i;
|
||||
|
||||
negop = (struct icmsg_negotiate *)&buf[
|
||||
sizeof(struct vmbuspipe_hdr) +
|
||||
sizeof(struct icmsg_hdr)];
|
||||
icmsghdrp->icmsgsize = 0x10;
|
||||
|
||||
if (negop->icframe_vercnt == 2 &&
|
||||
negop->icversion_data[1].major == 3) {
|
||||
negop->icversion_data[0].major = 3;
|
||||
negop->icversion_data[0].minor = 0;
|
||||
negop->icversion_data[1].major = 3;
|
||||
negop->icversion_data[1].minor = 0;
|
||||
} else {
|
||||
negop->icversion_data[0].major = 1;
|
||||
negop->icversion_data[0].minor = 0;
|
||||
negop->icversion_data[1].major = 1;
|
||||
negop->icversion_data[1].minor = 0;
|
||||
}
|
||||
negop = (struct icmsg_negotiate *)&buf[
|
||||
sizeof(struct vmbuspipe_hdr) +
|
||||
sizeof(struct icmsg_hdr)];
|
||||
|
||||
negop->icframe_vercnt = 1;
|
||||
negop->icmsg_vercnt = 1;
|
||||
icframe_vercnt = negop->icframe_vercnt;
|
||||
icmsg_vercnt = negop->icmsg_vercnt;
|
||||
|
||||
/*
|
||||
* Select the framework version number we will
|
||||
* support.
|
||||
*/
|
||||
|
||||
for (i = 0; i < negop->icframe_vercnt; i++) {
|
||||
if (negop->icversion_data[i].major <= max_fw_version)
|
||||
icframe_vercnt = negop->icversion_data[i].major;
|
||||
}
|
||||
|
||||
for (i = negop->icframe_vercnt;
|
||||
(i < negop->icframe_vercnt + negop->icmsg_vercnt); i++) {
|
||||
if (negop->icversion_data[i].major <= max_srv_version)
|
||||
icmsg_vercnt = negop->icversion_data[i].major;
|
||||
}
|
||||
|
||||
/*
|
||||
* Respond with the maximum framework and service
|
||||
* version numbers we can support.
|
||||
*/
|
||||
negop->icframe_vercnt = 1;
|
||||
negop->icmsg_vercnt = 1;
|
||||
negop->icversion_data[0].major = icframe_vercnt;
|
||||
negop->icversion_data[0].minor = 0;
|
||||
negop->icversion_data[1].major = icmsg_vercnt;
|
||||
negop->icversion_data[1].minor = 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(vmbus_prep_negotiate_resp);
|
||||
|
||||
/*
|
||||
|
@@ -252,7 +252,7 @@ void hv_cleanup(void)
|
||||
*
|
||||
* This involves a hypercall.
|
||||
*/
|
||||
u16 hv_post_message(union hv_connection_id connection_id,
|
||||
int hv_post_message(union hv_connection_id connection_id,
|
||||
enum hv_message_type message_type,
|
||||
void *payload, size_t payload_size)
|
||||
{
|
||||
|
@@ -394,7 +394,8 @@ void hv_kvp_onchannelcallback(void *context)
|
||||
sizeof(struct vmbuspipe_hdr)];
|
||||
|
||||
if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) {
|
||||
vmbus_prep_negotiate_resp(icmsghdrp, negop, recv_buffer);
|
||||
vmbus_prep_negotiate_resp(icmsghdrp, negop,
|
||||
recv_buffer, MAX_SRV_VER, MAX_SRV_VER);
|
||||
} else {
|
||||
kvp_msg = (struct hv_kvp_msg *)&recv_buffer[
|
||||
sizeof(struct vmbuspipe_hdr) +
|
||||
|
@@ -70,7 +70,8 @@ static void shutdown_onchannelcallback(void *context)
|
||||
sizeof(struct vmbuspipe_hdr)];
|
||||
|
||||
if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) {
|
||||
vmbus_prep_negotiate_resp(icmsghdrp, negop, shut_txf_buf);
|
||||
vmbus_prep_negotiate_resp(icmsghdrp, negop,
|
||||
shut_txf_buf, MAX_SRV_VER, MAX_SRV_VER);
|
||||
} else {
|
||||
shutdown_msg =
|
||||
(struct shutdown_msg_data *)&shut_txf_buf[
|
||||
@@ -195,7 +196,8 @@ static void timesync_onchannelcallback(void *context)
|
||||
sizeof(struct vmbuspipe_hdr)];
|
||||
|
||||
if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) {
|
||||
vmbus_prep_negotiate_resp(icmsghdrp, NULL, time_txf_buf);
|
||||
vmbus_prep_negotiate_resp(icmsghdrp, NULL, time_txf_buf,
|
||||
MAX_SRV_VER, MAX_SRV_VER);
|
||||
} else {
|
||||
timedatap = (struct ictimesync_data *)&time_txf_buf[
|
||||
sizeof(struct vmbuspipe_hdr) +
|
||||
@@ -234,7 +236,8 @@ static void heartbeat_onchannelcallback(void *context)
|
||||
sizeof(struct vmbuspipe_hdr)];
|
||||
|
||||
if (icmsghdrp->icmsgtype == ICMSGTYPE_NEGOTIATE) {
|
||||
vmbus_prep_negotiate_resp(icmsghdrp, NULL, hbeat_txf_buf);
|
||||
vmbus_prep_negotiate_resp(icmsghdrp, NULL,
|
||||
hbeat_txf_buf, MAX_SRV_VER, MAX_SRV_VER);
|
||||
} else {
|
||||
heartbeat_msg =
|
||||
(struct heartbeat_msg_data *)&hbeat_txf_buf[
|
||||
|
@@ -495,7 +495,7 @@ extern int hv_init(void);
|
||||
|
||||
extern void hv_cleanup(void);
|
||||
|
||||
extern u16 hv_post_message(union hv_connection_id connection_id,
|
||||
extern int hv_post_message(union hv_connection_id connection_id,
|
||||
enum hv_message_type message_type,
|
||||
void *payload, size_t payload_size);
|
||||
|
||||
|
新增問題並參考
封鎖使用者